GCP.Bigtable reference
AppProfile
Section titled “AppProfile”Source:
src/GCP/Bigtable/AppProfile.ts
A Cloud Bigtable app profile — how client traffic is routed across clusters in an instance.
The parent instance must already exist. Every instance has a built-in
default profile; this resource creates additional profiles.
Changing appProfileId or instance replaces the profile.
Description, routing, and isolation update in place.
App profiles have no labels field. Alchemy treats a profile as owned
when its parent instance carries Alchemy labels, so list /
pnpm nuke:gcp can find it. The built-in default profile is never
listed.
AppProfile: Creating an App Profile
Section titled “AppProfile: Creating an App Profile”Multi-cluster routing
const instance = yield* GCP.Bigtable.Instance("Data", {});const profile = yield* GCP.Bigtable.AppProfile("Analytics", { instance: instance.name, description: "analytics reads", multiClusterRouting: {},});Single-cluster routing
const profile = yield* GCP.Bigtable.AppProfile("Writes", { instance: instance.name, singleClusterRouting: { clusterId: "cluster", allowTransactionalWrites: true, },});Cluster
Section titled “Cluster”Source:
src/GCP/Bigtable/Cluster.ts
A Cloud Bigtable cluster — a resizable group of nodes in one zone that serves every table in the parent instance.
An instance always has at least one cluster (created with the instance). Use this resource to add additional clusters or to manage an existing cluster’s node count and autoscaling. You cannot delete the last cluster in an instance.
Changing clusterId, instance, location, defaultStorageType,
nodeScalingFactor, or encryptionConfig.kmsKeyName replaces the
cluster. serveNodes and clusterConfig.clusterAutoscalingConfig
update in place.
Clusters have no labels field. list enumerates clusters on
alchemy-labeled instances so pnpm nuke:gcp can find leaked rows.
Provisioning typically takes several minutes.
Cluster: Creating a Cluster
Section titled “Cluster: Creating a Cluster”Additional cluster on an existing instance
const replica = yield* GCP.Bigtable.Cluster("Replica", { instance: instance.instanceId, location: "us-central1-b", serveNodes: 1,});Explicit id and HDD storage
const replica = yield* GCP.Bigtable.Cluster("Replica", { instance: "app-instance", clusterId: "app-replica", location: "us-central1-c", defaultStorageType: "HDD", serveNodes: 1,});Cluster: Autoscaling
Section titled “Cluster: Autoscaling”const replica = yield* GCP.Bigtable.Cluster("Replica", { instance: "app-instance", location: "us-central1-f", clusterConfig: { clusterAutoscalingConfig: { autoscalingLimits: { minServeNodes: 1, maxServeNodes: 3 }, autoscalingTargets: { cpuUtilizationPercent: 50 }, }, },});GetCluster
Section titled “GetCluster”Source:
src/GCP/Bigtable/GetCluster.ts
Runtime binding for Cloud Bigtable clusters.get.
Bind this operation to a Cluster in a Function/Action init
phase. Provide GetClusterHttp.
GetCluster: Observing Clusters
Section titled “GetCluster: Observing Clusters”const getCluster = yield* GCP.Bigtable.GetCluster(replica);const live = yield* getCluster();GetClusterHttp
Section titled “GetClusterHttp”Source:
src/GCP/Bigtable/GetClusterHttp.tsKind: Layer · Provides:GCP.Bigtable.GetCluster
HTTP implementation of GetCluster.
GetInstance
Section titled “GetInstance”Source:
src/GCP/Bigtable/GetInstance.ts
Runtime binding for Cloud Bigtable instances.get.
Bind this operation to an Instance in a Function/Action init
phase. Provide GetInstanceHttp.
GetInstance: Observing Instances
Section titled “GetInstance: Observing Instances”const getInstance = yield* GCP.Bigtable.GetInstance(store);const live = yield* getInstance();GetInstanceHttp
Section titled “GetInstanceHttp”Source:
src/GCP/Bigtable/GetInstanceHttp.tsKind: Layer · Provides:GCP.Bigtable.GetInstance
HTTP implementation of GetInstance.
GetTable
Section titled “GetTable”Source:
src/GCP/Bigtable/GetTable.ts
Runtime binding for Bigtable Admin tables.get.
Bind this operation to a Table in a Function/Action init
phase. Provide GetTableHttp.
GetTable: Observing Tables
Section titled “GetTable: Observing Tables”const getTable = yield* GCP.Bigtable.GetTable(users);const live = yield* getTable({ view: "SCHEMA_VIEW" });GetTableHttp
Section titled “GetTableHttp”Source:
src/GCP/Bigtable/GetTableHttp.tsKind: Layer · Provides:GCP.Bigtable.GetTable
HTTP implementation of GetTable.
Instance
Section titled “Instance”Source:
src/GCP/Bigtable/Instance.ts
A Cloud Bigtable instance — a container for clusters, tables, and app profiles.
Create requires at least one cluster. The default is a single 1-node
HDD cluster in us-central1-b. Changing instanceId replaces the
instance. displayName, type, edition, and labels update in
place. Cluster create-time fields (location, storage type, CMEK) are
immutable; manage clusters after create with GCP.Bigtable.Cluster.
Provisioning typically takes one to two minutes.
Instance: Creating an Instance
Section titled “Instance: Creating an Instance”Generated name, 1-node HDD cluster
const instance = yield* GCP.Bigtable.Instance("Data", {});Explicit id, labels, and cluster
const instance = yield* GCP.Bigtable.Instance("Data", { instanceId: "app-bt", displayName: "app bigtable", type: "PRODUCTION", labels: { env: "prod" }, clusters: { cluster: { location: "us-central1-b", serveNodes: 1, defaultStorageType: "HDD", }, },});Instance: Observing Instances
Section titled “Instance: Observing Instances”const getInstance = yield* GCP.Bigtable.GetInstance(instance);const live = yield* getInstance();InstancesClustersBackup
Section titled “InstancesClustersBackup”Source:
src/GCP/Bigtable/InstancesClustersBackup.ts
A Cloud Bigtable backup of a table, stored on one cluster.
The parent instance, cluster, and source table must already exist.
Changing backupId, instance, cluster, sourceTable, or
backupType replaces the backup. expireTime and
hotToStandardTime update in place.
Backups have no labels field. Alchemy treats a backup as owned when
its parent instance carries Alchemy labels, so list /
pnpm nuke:gcp can find it.
InstancesClustersBackup: Creating a Backup
Section titled “InstancesClustersBackup: Creating a Backup”7-day backup of an existing table
const backup = yield* GCP.Bigtable.InstancesClustersBackup("Nightly", { instance: instance.name, cluster: "cluster", sourceTable: table.name,});Explicit id and expiration
const backup = yield* GCP.Bigtable.InstancesClustersBackup("Nightly", { instance: instance.name, cluster: replica.clusterId, sourceTable: table.name, backupId: "nightly", expireTime: "2026-12-31T00:00:00Z", backupType: "STANDARD",});InstancesLogicalView
Section titled “InstancesLogicalView”Source:
src/GCP/Bigtable/InstancesLogicalView.ts
A Cloud Bigtable logical view — a SQL SELECT over a table that can be queried as a virtual table.
The parent instance must already exist and the query cannot use
SELECT *. Changing logicalViewId or instance replaces the view.
query and deletionProtection update in place.
Logical views have no labels field. Alchemy treats a view as owned
when its parent instance carries Alchemy labels, so list /
pnpm nuke:gcp can find it.
InstancesLogicalView: Creating a Logical View
Section titled “InstancesLogicalView: Creating a Logical View”const users = yield* GCP.Bigtable.Table("Users", { instance: instance.name, columnFamilies: { cf: {} },});const view = yield* GCP.Bigtable.InstancesLogicalView("Active", { instance: instance.name, query: "SELECT _key FROM users",});InstancesMaterializedView
Section titled “InstancesMaterializedView”Source:
src/GCP/Bigtable/InstancesMaterializedView.ts
A Cloud Bigtable continuous materialized view — a SQL SELECT whose results are precomputed and kept current.
The parent instance must already exist. The query must use GROUP BY
or ORDER BY and cannot use SELECT *. Changing materializedViewId,
instance, or query replaces the view. deletionProtection updates
in place.
Materialized views have no labels field. Alchemy treats a view as
owned when its parent instance carries Alchemy labels, so list /
pnpm nuke:gcp can find it.
InstancesMaterializedView: Creating a Materialized View
Section titled “InstancesMaterializedView: Creating a Materialized View”const events = yield* GCP.Bigtable.Table("Events", { instance: instance.name, columnFamilies: { cf: {} },});const view = yield* GCP.Bigtable.InstancesMaterializedView("Counts", { instance: instance.name, query: "SELECT '*' AS _key, COUNT(*) AS row_count FROM events GROUP BY _key",});InstancesTablesAuthorizedView
Section titled “InstancesTablesAuthorizedView”Source:
src/GCP/Bigtable/InstancesTablesAuthorizedView.ts
A Cloud Bigtable authorized view — a named subset of a table used for fine-grained IAM.
The parent instance and table must already exist. Changing
authorizedViewId, instance, or table replaces the view.
subsetView and deletionProtection update in place.
Authorized views have no labels field. Alchemy treats a view as owned
when its parent instance carries Alchemy labels, so list /
pnpm nuke:gcp can find it.
InstancesTablesAuthorizedView: Creating an Authorized View
Section titled “InstancesTablesAuthorizedView: Creating an Authorized View”const view = yield* GCP.Bigtable.InstancesTablesAuthorizedView("Public", { instance: instance.name, table: table.name, subsetView: { rowPrefixes: [""], familySubsets: { cf: { qualifierPrefixes: [""] }, }, },});InstancesTablesSchemaBundle
Section titled “InstancesTablesSchemaBundle”Source:
src/GCP/Bigtable/InstancesTablesSchemaBundle.ts
A Cloud Bigtable schema bundle — a named FileDescriptorSet used to decode protobuf cell values.
The parent instance and table must already exist. Changing
schemaBundleId, instance, or table replaces the bundle.
protoDescriptors update in place (must be backwards compatible
unless ignoreWarnings is true).
Schema bundles have no labels field. Alchemy treats a bundle as owned
when its parent instance carries Alchemy labels, so list /
pnpm nuke:gcp can find it.
InstancesTablesSchemaBundle: Creating a Schema Bundle
Section titled “InstancesTablesSchemaBundle: Creating a Schema Bundle”const bundle = yield* GCP.Bigtable.InstancesTablesSchemaBundle("Rows", { instance: instance.name, table: table.name, protoDescriptors: descriptors,});Source:
src/GCP/Bigtable/Table.ts
A Cloud Bigtable table — rows keyed by row key, grouped into column families.
The parent instance must already exist. Changing tableId,
instance, or granularity replaces the table. Column families,
deletion protection, change streams, and automated backups update in
place. Row read/write is a data-plane API; use GetTable for
admin metadata.
Tables have no labels field. Alchemy treats a table as owned when its
parent instance carries Alchemy labels, so list / pnpm nuke:gcp
can find it.
Table: Creating a Table
Section titled “Table: Creating a Table”const instance = yield* GCP.Bigtable.Instance("Data", {});const table = yield* GCP.Bigtable.Table("Users", { instance: instance.name, columnFamilies: { cf: { gcRule: { maxNumVersions: 3 } }, },});Table: Reading Table Metadata
Section titled “Table: Reading Table Metadata”const getTable = yield* GCP.Bigtable.GetTable(table);const live = yield* getTable({ view: "SCHEMA_VIEW" });