GCP.Dataplex reference
AspectType
Section titled “AspectType”Source:
packages/gcp/src/Dataplex/AspectType.ts
A Dataplex AspectType — a template for Aspects on catalog Entries.
Location, aspect type id, data classification, and authorization are immutable. Description, display name, labels, and the metadata template update in place.
AspectType: Creating an AspectType
Section titled “AspectType: Creating an AspectType”const aspectType = yield* GCP.Dataplex.AspectType("Schema", { displayName: "schema fields", labels: { env: "test" }, metadataTemplate: { name: "schema", type: "record", recordFields: [ { name: "owner", type: "string", index: 1, annotations: { displayName: "Owner" }, }, ], },});AspectType: Looking up an existing aspect type
Section titled “AspectType: Looking up an existing aspect type”AspectType.lookup references an aspect type 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
aspect type.
const aspectType = GCP.Dataplex.AspectType.lookup({ aspectTypeId: "my-aspect-type",});DataDomain
Section titled “DataDomain”Source:
packages/gcp/src/Dataplex/DataDomain.ts
A Dataplex DataDomain — a logical grouping of data resources for governance, discovery, and management.
Location, domain id, and parent domain are immutable. Display name, description, contacts, and labels update in place.
DataDomain: Creating a DataDomain
Section titled “DataDomain: Creating a DataDomain”const domain = yield* GCP.Dataplex.DataDomain("Finance", { displayName: "Finance", labels: { env: "test" }, contacts: { identities: [ { contactName: "steward", contactRole: "steward", contactId: "steward@example.com", }, ], },});DataDomain: Looking up an existing data domain
Section titled “DataDomain: Looking up an existing data domain”DataDomain.lookup references a data domain 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
data domain.
const dataDomain = GCP.Dataplex.DataDomain.lookup({ dataDomainId: "my-data-domain",});DataDomainsBinding
Section titled “DataDomainsBinding”Source:
packages/gcp/src/Dataplex/DataDomainsBinding.ts
A Dataplex DataDomainBinding that includes a Google Cloud resource (and its contents) in a DataDomain.
Bindings have no labels or description. list walks alchemy-labeled
DataDomains and returns their bindings so nuke can find them. Parent,
binding id, and resource are identity — there is no in-place update
API.
DataDomainsBinding: Creating a DataDomainBinding
Section titled “DataDomainsBinding: Creating a DataDomainBinding”const binding = yield* GCP.Dataplex.DataDomainsBinding("Analytics", { parent: domain.name, resource: "//bigquery.googleapis.com/projects/my-project/datasets/analytics",});DataProduct
Section titled “DataProduct”Source:
packages/gcp/src/Dataplex/DataProduct.ts
A Dataplex Data Product — a curated collection of data assets packaged for a use case.
Location and product id are immutable. Display name, description, labels, owners, icon, access groups, and approval config update in place.
DataProduct: Creating a Data Product
Section titled “DataProduct: Creating a Data Product”const product = yield* GCP.Dataplex.DataProduct("Sales", { displayName: "Sales mart", ownerEmails: ["owner@example.com"], labels: { env: "test" },});DataProduct: Looking up an existing data product
Section titled “DataProduct: Looking up an existing data product”DataProduct.lookup references a data product 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
data product.
const dataProduct = GCP.Dataplex.DataProduct.lookup({ dataProductId: "my-data-product",});DataProductsDataAsset
Section titled “DataProductsDataAsset”Source:
packages/gcp/src/Dataplex/DataProductsDataAsset.ts
A Dataplex Data Asset packaged inside a Data Product.
Parent, asset id, and resource are immutable. Labels and access-group
configs update in place.
DataProductsDataAsset: Creating a Data Asset
Section titled “DataProductsDataAsset: Creating a Data Asset”const asset = yield* GCP.Dataplex.DataProductsDataAsset("Orders", { parent: product.name, resource: "//bigquery.googleapis.com/projects/my-project/datasets/sales/tables/orders", labels: { env: "test" },});DataProductsDataAsset: Looking up an existing data products data asset
Section titled “DataProductsDataAsset: Looking up an existing data products data asset”DataProductsDataAsset.lookup references a data products data asset
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 data products data asset.
const dataProductsDataAsset = GCP.Dataplex.DataProductsDataAsset.lookup({ dataAssetId: "my-data-asset", parent: "my-parent",});DataScan
Section titled “DataScan”Source:
packages/gcp/src/Dataplex/DataScan.ts
A Dataplex DataScan that profiles, quality-checks, discovers, or documents a BigQuery table, dataset, or Cloud Storage bucket.
Location, scan id, data source, and execution identity are immutable. Description, display name, labels, execution spec, and scan specs update in place.
DataScan: Creating a DataScan
Section titled “DataScan: Creating a DataScan”const scan = yield* GCP.Dataplex.DataScan("OrdersProfile", { displayName: "orders profile", labels: { env: "test" }, data: { resource: "//bigquery.googleapis.com/projects/my-project/datasets/sales/tables/orders", }, dataProfileSpec: {},});DataScan: Looking up an existing data scan
Section titled “DataScan: Looking up an existing data scan”DataScan.lookup references a data scan 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 data scan.
const dataScan = GCP.Dataplex.DataScan.lookup({ dataScanId: "my-data-scan",});EncryptionConfig
Section titled “EncryptionConfig”Source:
packages/gcp/src/Dataplex/EncryptionConfig.ts
A Dataplex EncryptionConfig that opts an organization location into customer-managed encryption keys (CMEK).
EncryptionConfigs have no labels field. Organization, location, and id
are immutable (default is the only supported id). Key and metastore
encryption update in place. list returns an empty set because
ownership cannot be stamped on this org singleton.
EncryptionConfig: Creating an EncryptionConfig
Section titled “EncryptionConfig: Creating an EncryptionConfig”const config = yield* GCP.Dataplex.EncryptionConfig("Default", { organizationId: "1234567890", location: "us-central1",});EncryptionConfig: Looking up an existing encryption config
Section titled “EncryptionConfig: Looking up an existing encryption config”EncryptionConfig.lookup references an encryption config 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
encryption config.
const encryptionConfig = GCP.Dataplex.EncryptionConfig.lookup({ organizationId: "my-organization",});EntryGroup
Section titled “EntryGroup”Source:
packages/gcp/src/Dataplex/EntryGroup.ts
A Dataplex Universal Catalog Entry Group — a logical grouping of Entries.
Changing entryGroupId or location replaces the group. Description,
display name, and labels update in place.
EntryGroup: Creating an Entry Group
Section titled “EntryGroup: Creating an Entry Group”Generated name
const group = yield* GCP.Dataplex.EntryGroup("Catalog", {});Explicit id and labels
const group = yield* GCP.Dataplex.EntryGroup("Catalog", { entryGroupId: "app-catalog", displayName: "App catalog", labels: { env: "prod" },});EntryGroup: Updating an Entry Group
Section titled “EntryGroup: Updating an Entry Group”// Same logical id as before; only the changed props differ.const group = yield* GCP.Dataplex.EntryGroup("Catalog", { entryGroupId: "app-catalog", description: "catalog v2", labels: { env: "prod", team: "data" },});EntryGroup: Looking up an existing entry group
Section titled “EntryGroup: Looking up an existing entry group”EntryGroup.lookup references an entry group 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
entry group.
const entryGroup = GCP.Dataplex.EntryGroup.lookup({ entryGroupId: "my-entry-group",});EntryGroupsEntry
Section titled “EntryGroupsEntry”Source:
packages/gcp/src/Dataplex/EntryGroupsEntry.ts
A Dataplex Universal Catalog Entry — a metadata record for a data resource.
Entries have no top-level labels field, so Alchemy stamps ownership
into entrySource.labels. Changing entryId, entryGroup,
location, entryType, or parentEntry replaces the entry. FQN,
aspects, and source metadata update in place.
EntryGroupsEntry: Creating an Entry
Section titled “EntryGroupsEntry: Creating an Entry”const entry = yield* GCP.Dataplex.EntryGroupsEntry("Orders", { entryGroup: group.name, entryType: "projects/dataplex-types/locations/global/entryTypes/generic", labels: { env: "prod" },});EntryGroupsEntry: Updating an Entry
Section titled “EntryGroupsEntry: Updating an Entry”// Same logical id as before; only the changed props differ.const entry = yield* GCP.Dataplex.EntryGroupsEntry("Orders", { entryGroup: group.name, entryType: "projects/dataplex-types/locations/global/entryTypes/generic", fullyQualifiedName: "app.orders", labels: { env: "prod", team: "data" },});EntryGroupsEntry: Looking up an existing entry groups entry
Section titled “EntryGroupsEntry: Looking up an existing entry groups entry”EntryGroupsEntry.lookup references an entry groups entry 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 entry groups entry.
const entryGroupsEntry = GCP.Dataplex.EntryGroupsEntry.lookup({ entryId: "my-entry", entryGroup: "my-entry-group",});EntryGroupsEntryLink
Section titled “EntryGroupsEntryLink”Source:
packages/gcp/src/Dataplex/EntryGroupsEntryLink.ts
A Dataplex Entry Link between two Catalog Entries.
Entry links have no labels field. list finds links by looking up
entries in alchemy-labeled entry groups. Changing entryLinkId,
entryGroup, location, entryLinkType, or entryReferences
replaces the link. Aspects update in place.
EntryGroupsEntryLink: Creating an Entry Link
Section titled “EntryGroupsEntryLink: Creating an Entry Link”const link = yield* GCP.Dataplex.EntryGroupsEntryLink("Related", { entryGroup: group.name, entryReferences: [ { name: left.name, type: "SOURCE" }, { name: right.name, type: "TARGET" }, ],});EntryType
Section titled “EntryType”Source:
packages/gcp/src/Dataplex/EntryType.ts
A Dataplex Universal Catalog Entry Type — a template for creating Entries.
Changing entryTypeId, location, or authorization replaces the
type. Description, display name, labels, aliases, platform, system,
and required aspects update in place.
EntryType: Creating an Entry Type
Section titled “EntryType: Creating an Entry Type”Generated name
const type = yield* GCP.Dataplex.EntryType("Table", { typeAliases: ["TABLE"], platform: "GCS",});Explicit id and labels
const type = yield* GCP.Dataplex.EntryType("Table", { entryTypeId: "app-table", displayName: "App table", system: "BigQuery", labels: { env: "prod" },});EntryType: Updating an Entry Type
Section titled “EntryType: Updating an Entry Type”// Same logical id as before; only the changed props differ.const type = yield* GCP.Dataplex.EntryType("Table", { entryTypeId: "app-table", description: "table v2", typeAliases: ["TABLE", "DATASET"],});EntryType: Looking up an existing entry type
Section titled “EntryType: Looking up an existing entry type”EntryType.lookup references an entry type 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
entry type.
const entryType = GCP.Dataplex.EntryType.lookup({ entryTypeId: "my-entry-type",});GlossariesCategory
Section titled “GlossariesCategory”Source:
packages/gcp/src/Dataplex/GlossariesCategory.ts
A Dataplex Glossary Category nested under a Glossary.
Changing categoryId, glossary, or location replaces the
category. Description, display name, labels, and hierarchy parent
update in place.
GlossariesCategory: Creating a Glossary Category
Section titled “GlossariesCategory: Creating a Glossary Category”const category = yield* GCP.Dataplex.GlossariesCategory("Finance", { glossary: glossary.name, displayName: "Finance", labels: { env: "prod" },});GlossariesCategory: Updating a Glossary Category
Section titled “GlossariesCategory: Updating a Glossary Category”// Same logical id as before; only the changed props differ.const category = yield* GCP.Dataplex.GlossariesCategory("Finance", { glossary: glossary.name, description: "finance terms", labels: { env: "prod", team: "data" },});GlossariesCategory: Looking up an existing glossaries category
Section titled “GlossariesCategory: Looking up an existing glossaries category”GlossariesCategory.lookup references a glossaries category 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 glossaries category.
const glossariesCategory = GCP.Dataplex.GlossariesCategory.lookup({ categoryId: "my-category", glossary: "my-glossary",});GlossariesTerm
Section titled “GlossariesTerm”Source:
packages/gcp/src/Dataplex/GlossariesTerm.ts
A Dataplex glossary term — a defined business concept that can be attached to catalog entries.
Changing glossary, termId, or location replaces the term. Display
name, description, labels, and immediate parent update in place.
GlossariesTerm: Creating a Term
Section titled “GlossariesTerm: Creating a Term”Term under a glossary
const term = yield* GCP.Dataplex.GlossariesTerm("Customer", { glossary: glossary.name, displayName: "Customer", description: "a paying account", labels: { env: "dev" },});Named term
const term = yield* GCP.Dataplex.GlossariesTerm("Customer", { glossary: glossary.name, termId: "customer", labels: { env: "prod" },});GlossariesTerm: Looking up an existing glossaries term
Section titled “GlossariesTerm: Looking up an existing glossaries term”GlossariesTerm.lookup references a glossaries term 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
glossaries term.
const glossariesTerm = GCP.Dataplex.GlossariesTerm.lookup({ termId: "my-term", glossary: "my-glossary",});Glossary
Section titled “Glossary”Source:
packages/gcp/src/Dataplex/Glossary.ts
A Dataplex Glossary — a collection of GlossaryCategories and GlossaryTerms.
Changing glossaryId or location replaces the glossary. Description,
display name, and labels update in place. Nested categories and terms
must be deleted before the glossary.
Glossary: Creating a Glossary
Section titled “Glossary: Creating a Glossary”Generated name
const glossary = yield* GCP.Dataplex.Glossary("BusinessTerms", {});Explicit id and labels
const glossary = yield* GCP.Dataplex.Glossary("BusinessTerms", { glossaryId: "app-glossary", displayName: "App glossary", labels: { env: "prod" },});Glossary: Updating a Glossary
Section titled “Glossary: Updating a Glossary”// Same logical id as before; only the changed props differ.const glossary = yield* GCP.Dataplex.Glossary("BusinessTerms", { glossaryId: "app-glossary", description: "glossary v2", labels: { env: "prod", team: "data" },});Glossary: Looking up an existing glossary
Section titled “Glossary: Looking up an existing glossary”Glossary.lookup references a glossary 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 glossary.
const glossary = GCP.Dataplex.Glossary.lookup({ glossaryId: "my-glossary" });Source:
packages/gcp/src/Dataplex/Lake.ts
A Dataplex lake — a regional container for zones, assets, and tasks.
Changing lakeId or location replaces the lake. Display name,
description, labels, and metastore association update in place.
Lake: Creating a Lake
Section titled “Lake: Creating a Lake”Generated name
const lake = yield* GCP.Dataplex.Lake("Warehouse", { labels: { env: "dev" },});Named lake with a description
const lake = yield* GCP.Dataplex.Lake("Warehouse", { lakeId: "analytics-lake", location: "us-central1", displayName: "Analytics", description: "curated warehouse", labels: { env: "prod" },});Lake: Looking up an existing lake
Section titled “Lake: Looking up an existing lake”Lake.lookup references a lake 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 lake.
const lake = GCP.Dataplex.Lake.lookup({ lakeId: "my-lake" });LakesAsset
Section titled “LakesAsset”Source:
packages/gcp/src/Dataplex/LakesAsset.ts
A Dataplex asset — a Cloud Storage bucket or BigQuery dataset managed inside a lake zone.
Changing zone, assetId, location, or the attached resource
(resourceSpec.name / type) replaces the asset. Display name,
description, labels, and discovery spec update in place.
LakesAsset: Creating an Asset
Section titled “LakesAsset: Creating an Asset”Cloud Storage bucket asset
const asset = yield* GCP.Dataplex.LakesAsset("RawBucket", { zone: zone.name, resourceSpec: { type: "STORAGE_BUCKET", name: `projects/${projectNumber}/buckets/${bucket.bucketName}`, }, labels: { env: "dev" },});Named asset with discovery disabled
const asset = yield* GCP.Dataplex.LakesAsset("RawBucket", { zone: zone.name, assetId: "landing-bucket", resourceSpec: { type: "STORAGE_BUCKET", name: `projects/${projectNumber}/buckets/${bucket.bucketName}`, }, discoverySpec: { enabled: false },});LakesAsset: Looking up an existing lakes asset
Section titled “LakesAsset: Looking up an existing lakes asset”LakesAsset.lookup references a lakes asset 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
lakes asset.
const lakesAsset = GCP.Dataplex.LakesAsset.lookup({ assetId: "my-asset", zone: "us-central1-a",});LakesEntitiesPartition
Section titled “LakesEntitiesPartition”Source:
packages/gcp/src/Dataplex/LakesEntitiesPartition.ts
A Dataplex metadata partition under a zone entity.
Partitions have no labels or description field: read reports a
partition it finds without prior state as unowned, and list returns
the partitions of entities in Alchemy-labeled lakes. Identity is the parent entity plus values; changing
entity, values, or location replaces the partition.
LakesEntitiesPartition: Creating a Partition
Section titled “LakesEntitiesPartition: Creating a Partition”const partition = yield* GCP.Dataplex.LakesEntitiesPartition("Day", { entity: entity.name, values: ["2024-01-01"], location: `gs://${bucket.bucketName}/events/dt=2024-01-01`,});LakesEntity
Section titled “LakesEntity”Source:
packages/gcp/src/Dataplex/LakesEntity.ts
A Dataplex metadata entity — a table or fileset registered in a zone.
Entities have no labels field: read reports an entity it finds
without prior state as unowned (adopt it with --adopt), and list
returns the entities of Alchemy-labeled lakes. Changing zone, entityId, type,
asset, dataPath, or system replaces the entity. Display name,
description, format, and schema update in place.
LakesEntity: Creating an Entity
Section titled “LakesEntity: Creating an Entity”const entity = yield* GCP.Dataplex.LakesEntity("Events", { zone: zone.name, asset: asset.assetId, type: "TABLE", system: "CLOUD_STORAGE", dataPath: `gs://${bucket.bucketName}/events`, format: { format: "PARQUET" }, schema: { userManaged: true, fields: [{ name: "id", type: "STRING", mode: "REQUIRED" }], },});LakesEntity: Looking up an existing lakes entity
Section titled “LakesEntity: Looking up an existing lakes entity”LakesEntity.lookup references a lakes entity 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
lakes entity.
const lakesEntity = GCP.Dataplex.LakesEntity.lookup({ entityId: "my-entity", zone: "us-central1-a",});LakesTask
Section titled “LakesTask”Source:
packages/gcp/src/Dataplex/LakesTask.ts
A Dataplex lake task — a Spark or notebook job scheduled against a lake.
Changing lake, taskId, location, or trigger type replaces the
task. Description, labels, execution spec, and Spark/notebook config
update in place.
LakesTask: Creating a Task
Section titled “LakesTask: Creating a Task”On-demand Spark SQL
const task = yield* GCP.Dataplex.LakesTask("SelectOne", { lake: lake.name, executionSpec: { serviceAccount }, spark: { sqlScript: "SELECT 1" },});Recurring notebook
const task = yield* GCP.Dataplex.LakesTask("Nightly", { lake: lake.name, triggerSpec: { type: "RECURRING", schedule: "0 2 * * *" }, executionSpec: { serviceAccount }, notebook: { notebook: "gs://bucket/job.ipynb" },});LakesTask: Looking up an existing lakes task
Section titled “LakesTask: Looking up an existing lakes task”LakesTask.lookup references a lakes task 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
lakes task.
const lakesTask = GCP.Dataplex.LakesTask.lookup({ taskId: "my-task", lake: "my-lake",});LakesZone
Section titled “LakesZone”Source:
packages/gcp/src/Dataplex/LakesZone.ts
A Dataplex zone — a logical grouping of assets inside a lake (RAW or
CURATED).
Changing lake, zoneId, location, type, or locationType
replaces the zone. Display name, description, labels, and discovery
spec update in place.
LakesZone: Creating a Zone
Section titled “LakesZone: Creating a Zone”RAW zone in a lake
const zone = yield* GCP.Dataplex.LakesZone("Landing", { lake: lake.name, type: "RAW", labels: { env: "dev" },});Named zone with discovery disabled
const zone = yield* GCP.Dataplex.LakesZone("Landing", { lake: lake.name, zoneId: "landing-raw", discoverySpec: { enabled: false },});LakesZone: Looking up an existing lakes zone
Section titled “LakesZone: Looking up an existing lakes zone”LakesZone.lookup references a lakes zone 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
lakes zone.
const lakesZone = GCP.Dataplex.LakesZone.lookup({ zoneId: "my-zone", lake: "my-lake",});MetadataFeed
Section titled “MetadataFeed”Source:
packages/gcp/src/Dataplex/MetadataFeed.ts
A Dataplex metadata feed that publishes catalog changes to Pub/Sub.
Changing metadataFeedId or location replaces the feed. Scope,
filters, destination topic, and labels update in place.
MetadataFeed: Creating a Feed
Section titled “MetadataFeed: Creating a Feed”Project-scoped feed
const feed = yield* GCP.Dataplex.MetadataFeed("Catalog", { pubsubTopic: topic.name, scope: { projects: [`projects/${project}`] }, labels: { env: "dev" },});Filtered create events
const feed = yield* GCP.Dataplex.MetadataFeed("Catalog", { pubsubTopic: topic.name, filters: { changeTypes: ["CREATE"] },});MetadataFeed: Looking up an existing metadata feed
Section titled “MetadataFeed: Looking up an existing metadata feed”MetadataFeed.lookup references a metadata feed 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
metadata feed.
const metadataFeed = GCP.Dataplex.MetadataFeed.lookup({ metadataFeedId: "my-metadata-feed",});