Skip to main content
Version: Preview

Bigtable

Experimental
Creates:
AssetsLineage

Configure in the UI

This plugin can be configured directly in the Marmot UI with a step-by-step wizard.

View Guide

The Bigtable plugin discovers the instances in a Google Cloud project, the tables in each instance, and the column families those tables define. Every instance becomes an Instance asset holding its tables through CONTAINS lineage. A table is named <instance>.<table>, because table names are only unique within an instance.

Columns

Bigtable declares column families but not the qualifiers stored under them, and every value is raw bytes. The plugin therefore reads a sample of rows per table (sample_rows, 100 by default) and records the family:qualifier pairs it saw, how many of the sampled rows held each one, and what the values looked like: text, int64 for the 8 byte number the increment operation writes, or binary. A qualifier keeps a specific type only while every sampled value agreed. Each table also gets a synthetic row_key column marked as the primary key.

Set include_columns: false to skip the sample. Tables then carry only the row_key column.

Row counts

Bigtable keeps no row count, so include_statistics has to scan. The scan gives up at max_count_rows and reports nothing for that table rather than a number that is really a floor.

Credentials

With no credentials block the plugin uses the credentials the environment already provides: Workload Identity, a service account attached to the machine, or GOOGLE_APPLICATION_CREDENTIALS. Supply credentials.credentials_file or credentials.credentials_json to use a specific service account key.

Emulator

emulator_host points the plugin at a local Bigtable emulator and connects without TLS or credentials. The emulator cannot list its own instances, so instances has to be listed when emulator_host is set. Tables discovered from an emulator get no Google Cloud Console link.

Example Configuration


project_id: "company-analytics"
instances:
- "prod-metrics"
credentials:
credentials_file: "/etc/marmot/bigtable-service-account.json"
include_columns: true
sample_rows: 100
include_statistics: true
max_count_rows: 100000
filter:
include:
- "^prod-metrics\\..*"
tags:
- "bigtable"
- "nosql"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
credentialsGCPCredentialsfalseGCP credentials configuration
emulator_hoststringfalsehost:port of a Bigtable emulator. Connects without credentials and requires instances to be listed
external_links[]ExternalLinkfalseExternal links to show on all assets
filterFilterfalseFilter discovered assets by name (regex)
include_backupsboolfalseCount the backups held by each instance
include_columnsboolfalseRead a sample of rows to find the columns each table holds
include_statisticsboolfalseCount the rows in each table. This reads the whole table
instances[]stringfalseInstance IDs to discover. Leave empty to discover every instance in the project
max_count_rowsintfalseGive up counting a table after this many rows
project_idstringtrueGoogle Cloud project ID
sample_rowsintfalseRows to read per table when finding columns
tagsTagsConfigfalseTags to apply to discovered assets

Available Metadata

The following metadata fields are available:

FieldTypeDescription
backup_countintNumber of backups held by the instance's clusters
change_stream_retentionstringHow long change data is retained
clusters[]BigtableClusterClusters serving the instance
column_families[]stringColumn families defined on the table
column_familystringColumn family the column belongs to
column_namestringColumn name in Bigtable's family:qualifier notation
data_typestringStorage type, always bytes
deletion_protectionboolWhether the table is protected against deletion
display_namestringInstance display name
emulatorboolWhether the instance was read from an emulator
gc_policiesmap[string]stringGarbage collection rule per column family
inferred_typestringWhat the sampled values looked like (text, int64, binary)
instance_idstringInstance the table belongs to
instance_typestringInstance type (PRODUCTION, DEVELOPMENT)
is_nullableboolWhether the column may be missing from a row
is_primary_keyboolWhether the column is the row key
labelsmap[string]stringLabels set on the instance
occurrenceintNumber of sampled rows that held the column
project_idstringGoogle Cloud project holding the table
qualifierstringQualifier within the column family
sampled_rowsintNumber of rows read to find the table's columns
statestringInstance state (READY, CREATING)
table_countintNumber of tables in the instance
table_namestringTable name within the instance
urlstringGoogle Cloud Console link to the table