bigtable.from() function

The bigtable.from() function is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

The bigtable.from() function retrieves data from a Google Cloud Bigtable data source.

*Function type: Input*

  1. import "experimental/bigtable"
  2. bigtable.from(
  3. token: "mySuPeRseCretTokEn",
  4. project: "exampleProjectID",
  5. instance: "exampleInstanceID",
  6. table: "example-table"
  7. )

Parameters

token

The Google Cloud IAM token to use to access the Cloud Bigtable database.

For more information, see the following:

*Data type: String*

project

The project ID of the Cloud Bigtable project to retrieve data from.

*Data type: String*

instance

The instance ID of the Cloud Bigtable instance to retrieve data from.

*Data type: String*

table

The name of the Cloud Bigtable table to retrieve data from.

*Data type: String*

Examples

The example below uses InfluxDB secrets to populate sensitive connection credentials.

  1. import "experimental/bigtable"
  2. import "influxdata/influxdb/secrets"
  3. bigtable_token = secrets.get(key: "BIGTABLE_TOKEN")
  4. bigtable_project = secrets.get(key: "BIGTABLE_PROJECT_ID")
  5. bigtable_instance = secrets.get(key: "BIGTABLE_INSTANCE_ID")
  6. bigtable.from(
  7. token: bigtable_token,
  8. project: bigtable_project,
  9. instance: bigtable_instance,
  10. table: "example-table"
  11. )