GCP.Metastore reference
Federation
Section titled “Federation”Source:
packages/gcp/src/Metastore/Federation.ts
A Dataproc Metastore federation that serves metadata from ranked BigQuery and Dataproc Metastore backends.
Changing federationId, location, or version replaces the
federation. Labels and backendMetastores update in place.
Federation: Creating a Federation
Section titled “Federation: Creating a Federation”BigQuery backend
const federation = yield* GCP.Metastore.Federation("Lakehouse", { version: "3.1.2", backendMetastores: { "1": { name: "projects/my-project", metastoreType: "BIGQUERY", }, }, labels: { env: "prod" },});Generated name
const federation = yield* GCP.Metastore.Federation("Lakehouse", { labels: { env: "test" },});Federation: Updating a Federation
Section titled “Federation: Updating a Federation”// Same logical id, changed props: the engine updates it in place.const federation = yield* GCP.Metastore.Federation("Lakehouse", { version: "3.1.2", backendMetastores: { "1": { name: "projects/my-project", metastoreType: "BIGQUERY", }, }, labels: { env: "prod", team: "data" },});Federation: Looking up an existing federation
Section titled “Federation: Looking up an existing federation”Federation.lookup references a federation Alchemy doesn’t manage
(created in the console or by another stack). It is read during
plan/deploy, never created, updated or deleted, and binds like a declared
federation.
const federation = GCP.Metastore.Federation.lookup({ federationId: "my-federation",});Service
Section titled “Service”Source:
packages/gcp/src/Metastore/Service.ts
A Dataproc Metastore service — a managed Hive metastore.
Changing serviceId, location, Hive version, network,
databaseType, encryptionConfig, networkConfig, or
releaseChannel replaces the service. Labels, port, tier, scaling,
telemetry, scheduled backups, metadata integration, maintenance
window, Hive overrides, and deletion protection update in place.
Service: Creating a Service
Section titled “Service: Creating a Service”Developer tier
const service = yield* GCP.Metastore.Service("Hive", { hiveMetastoreConfig: { version: "3.1.2" }, tier: "DEVELOPER", labels: { env: "test" },});Explicit id
const service = yield* GCP.Metastore.Service("Hive", { serviceId: "analytics-hive", hiveMetastoreConfig: { version: "3.1.2" }, port: 9083,});Service: Updating a Service
Section titled “Service: Updating a Service”// Same logical id, changed props: the engine updates it in place.const service = yield* GCP.Metastore.Service("Hive", { hiveMetastoreConfig: { version: "3.1.2" }, port: 9084, labels: { env: "prod" },});Service: Looking up an existing service
Section titled “Service: Looking up an existing service”Service.lookup references a service Alchemy doesn’t manage (created in
the console or by another stack). It is read during plan/deploy, never
created, updated or deleted, and binds like a declared service.
const service = GCP.Metastore.Service.lookup({ serviceId: "my-service" });ServicesBackup
Section titled “ServicesBackup”Source:
packages/gcp/src/Metastore/ServicesBackup.ts
A Dataproc Metastore service backup — a point-in-time capture of a Hive metastore.
Changing backupId, service, or location replaces the backup.
Description is set at create; backups have no update API.
ServicesBackup: Creating a Backup
Section titled “ServicesBackup: Creating a Backup”Manual backup
const backup = yield* GCP.Metastore.ServicesBackup("Nightly", { service: hive.name, description: "pre-release",});Explicit id
const backup = yield* GCP.Metastore.ServicesBackup("Nightly", { service: hive.name, backupId: "nightly-01",});ServicesBackup: Looking up an existing services backup
Section titled “ServicesBackup: Looking up an existing services backup”ServicesBackup.lookup references a services backup Alchemy doesn’t
manage (created in the console or by another stack). It is read during
plan/deploy, never created, updated or deleted, and binds like a declared
services backup.
const servicesBackup = GCP.Metastore.ServicesBackup.lookup({ backupId: "my-backup", service: "my-service",});