marmotdata/bigtable
Discover instances, tables and column families from Google Cloud Bigtable
The Bigtable plugin discovers instances, tables and column families from Google Cloud Bigtable.
Tables are identified in their MRN by <instance>.<table>, because a table name is only unique within an instance. The Marmot instance option is separate from the Bigtable instance and tells apart two projects that use the same Bigtable instance id. Each instance holds its tables through CONTAINS lineage.
Columns
Bigtable declares column families but not the qualifiers under them, and every value is raw bytes. The plugin reads sample_rows rows per table and records the family:qualifier pairs it saw, how many sampled rows held each one, and whether the values looked like text, an 8 byte number, or binary. Set include_columns to false to skip the sample.
Emulator
emulator_host connects to a local emulator without TLS or credentials. The emulator cannot list its own instances, so instances has to be listed alongside it. The plugin never reads BIGTABLE_EMULATOR_HOST, so one pipeline cannot change how another one connects.
Tests
Unit tests need nothing. The end to end tests need an emulator:
docker run -d --name bigtable-emulator -p 8086:8086 \
gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators \
gcloud beta emulators bigtable start --host-port=0.0.0.0:8086
MARMOT_TEST_BIGTABLE_EMULATOR=127.0.0.1:8086 go test ./...
Keyless authentication
On Marmot Cloud or Marmot Enterprise the pipeline can present its own identity instead of a service account key. Set credentials.workload_identity_provider to a Workload Identity Federation provider that trusts your Marmot instance as an OIDC issuer, and grant the pipeline's subject, pipeline:<name> as reported by the pipeline API, the role above directly (principal://iam.googleapis.com/<pool>/subject/pipeline:<name>), or grant it roles/iam.workloadIdentityUser on a service account named in credentials.service_account. No key exists anywhere; Marmot mints a short-lived token for each run.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Google Bigtable from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
credentialsGroup of settingsGCP credentials configuration
credentials_jsonSecretService account key JSON content
credentials_fileTextPath to a service account key JSON file
workload_identity_providerTextWorkload Identity Federation provider to exchange the Marmot identity token at, projects/<number>/locations/global/workloadIdentityPools/<pool>/providers/<provider>. Setting it federates: the pipeline presents a Marmot identity token and no key is needed; bind the pipeline's subject on the Google Cloud side
service_accountTextService account to impersonate after the exchange; empty acts as the federated principal directly
audienceTextAudience of the Marmot identity token. Derived from the credentials' federation settings; set it only when the cloud side expects another
project_idText RequiredGoogle Cloud project ID
instancesList of textInstance IDs to discover. Leave empty to discover every instance in the project
emulator_hostTexthost:port of a Bigtable emulator. Connects without credentials and requires instances to be listed
include_columnsYes or noRead a sample of rows to find the columns each table holds
sample_rowsNumberRows to read per table when finding columns
include_statisticsYes or noCount the rows in each table. This reads the whole table
max_count_rowsNumberGive up counting a table after this many rows
include_backupsYes or noCount the backups held by each instance
Assets emitted
Metadata this plugin attaches to each discovered asset.
Instance
The metadata fields the Bigtable plugin emits for instance assets.
Table
The metadata fields the Bigtable plugin emits for table assets.
Column
The per-column fields embedded in a table asset's schema. Bigtable declares column families but not the qualifiers under them, so everything below comes from a sample of rows.