GCP.BigLake reference
Catalog
Section titled “Catalog”Source:
src/GCP/BigLake/Catalog.ts
A BigLake Metastore catalog — the top-level container for Hive databases and tables.
Catalogs have no labels, description, or annotations, and Alchemy does
not write ownership into the catalog IAM policy: generated ids carry an
alc_ prefix that list / nuke match, and read reports an explicit
id it has no state for as unowned.
Location and catalog id are immutable. There is nothing else to
update in place.
Catalog: Creating a Catalog
Section titled “Catalog: Creating a Catalog”Generated id
const catalog = yield* GCP.BigLake.Catalog("Lake", {});Named catalog in a multi-region
const catalog = yield* GCP.BigLake.Catalog("Lake", { catalogId: "analytics", location: "US",});CatalogsDatabase
Section titled “CatalogsDatabase”Source:
src/GCP/BigLake/CatalogsDatabase.ts
A Hive database inside a BigLake Metastore catalog.
Databases have no labels field — Alchemy stamps ownership into
hiveOptions.parameters so list / nuke can find them. Catalog,
database id, and type are immutable. Hive location URI and parameters
update in place.
CatalogsDatabase: Creating a Database
Section titled “CatalogsDatabase: Creating a Database”Hive database on a GCS prefix
const catalog = yield* GCP.BigLake.Catalog("Lake", {});const database = yield* GCP.BigLake.CatalogsDatabase("Warehouse", { catalog: catalog.name, locationUri: `gs://${bucket.bucketName}/warehouse`, parameters: { owner: "analytics" },});Named database
const database = yield* GCP.BigLake.CatalogsDatabase("Warehouse", { catalog: catalog.name, databaseId: "sales", type: "HIVE", hiveOptions: { locationUri: "gs://my-bucket/sales", },});CatalogsDatabasesTable
Section titled “CatalogsDatabasesTable”Source:
src/GCP/BigLake/CatalogsDatabasesTable.ts
A Hive table inside a BigLake Metastore database.
Tables have no labels field — Alchemy stamps ownership into
hiveOptions.parameters so list / nuke can find them. Database,
table id, and type are immutable. Hive options update in place.
CatalogsDatabasesTable: Creating a Table
Section titled “CatalogsDatabasesTable: Creating a Table”Managed Hive table
const table = yield* GCP.BigLake.CatalogsDatabasesTable("Events", { database: database.name, hiveOptions: { tableType: "MANAGED_TABLE", storageDescriptor: { locationUri: `gs://${bucket.bucketName}/events`, inputFormat: "org.apache.hadoop.mapred.SequenceFileInputFormat", outputFormat: "org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat", }, parameters: { owner: "analytics" }, },});Named external table
const table = yield* GCP.BigLake.CatalogsDatabasesTable("Events", { database: database.name, tableId: "page_views", hiveOptions: { tableType: "EXTERNAL_TABLE", storageDescriptor: { locationUri: "gs://my-bucket/page_views", }, },});