GCP.Dataplex reference
AspectType
Section titled “AspectType”Source:
src/GCP/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" }, }, ], },});DataAttributeBinding
Section titled “DataAttributeBinding”Source:
src/GCP/Dataplex/DataAttributeBinding.ts
A Dataplex DataAttributeBinding that associates Data Taxonomy attributes with a Dataplex entity (and optional column/partition paths).
Location, binding id, and resource are immutable. Description, display
name, labels, attributes, and paths update in place.
DataAttributeBinding: Creating a DataAttributeBinding
Section titled “DataAttributeBinding: Creating a DataAttributeBinding”const binding = yield* GCP.Dataplex.DataAttributeBinding("Pii", { resource: entity.name, attributes: [attribute.name], labels: { env: "test" },});DataDomain
Section titled “DataDomain”Source:
src/GCP/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", }, ], },});DataDomainsBinding
Section titled “DataDomainsBinding”Source:
src/GCP/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:
src/GCP/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" },});DataProductsDataAsset
Section titled “DataProductsDataAsset”Source:
src/GCP/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" },});DataScan
Section titled “DataScan”Source:
src/GCP/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: {},});DataTaxonomiesAttribute
Section titled “DataTaxonomiesAttribute”Source:
src/GCP/Dataplex/DataTaxonomiesAttribute.ts
A Dataplex Data Attribute in a Data Taxonomy (for example PII).
Changing dataAttributeId, dataTaxonomy, or location replaces
the attribute. Description, display name, labels, parent, and access
specs update in place.
DataTaxonomiesAttribute: Creating a Data Attribute
Section titled “DataTaxonomiesAttribute: Creating a Data Attribute”const attr = yield* GCP.Dataplex.DataTaxonomiesAttribute("Pii", { dataTaxonomy: taxonomy.name, displayName: "PII", labels: { env: "prod" },});DataTaxonomiesAttribute: Updating a Data Attribute
Section titled “DataTaxonomiesAttribute: Updating a Data Attribute”// Same logical id as before; only the changed props differ.const attr = yield* GCP.Dataplex.DataTaxonomiesAttribute("Pii", { dataTaxonomy: taxonomy.name, description: "personally identifiable", labels: { env: "prod", class: "restricted" },});DataTaxonomy
Section titled “DataTaxonomy”Source:
src/GCP/Dataplex/DataTaxonomy.ts
A Dataplex Data Taxonomy — a hierarchical grouping of DataAttributes (for example PII classes).
Changing dataTaxonomyId or location replaces the taxonomy.
Description, display name, and labels update in place.
DataTaxonomy: Creating a Data Taxonomy
Section titled “DataTaxonomy: Creating a Data Taxonomy”Generated name
const taxonomy = yield* GCP.Dataplex.DataTaxonomy("Pii", {});Explicit id and labels
const taxonomy = yield* GCP.Dataplex.DataTaxonomy("Pii", { dataTaxonomyId: "sensitive-data", displayName: "Sensitive data", labels: { env: "prod" },});DataTaxonomy: Updating a Data Taxonomy
Section titled “DataTaxonomy: Updating a Data Taxonomy”// Same logical id as before; only the changed props differ.const taxonomy = yield* GCP.Dataplex.DataTaxonomy("Pii", { dataTaxonomyId: "sensitive-data", description: "pii classes v2", labels: { env: "prod", team: "data" },});EncryptionConfig
Section titled “EncryptionConfig”Source:
src/GCP/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",});EntryGroup
Section titled “EntryGroup”Source:
src/GCP/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" },});EntryGroupsEntry
Section titled “EntryGroupsEntry”Source:
src/GCP/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" },});EntryGroupsEntryLink
Section titled “EntryGroupsEntryLink”Source:
src/GCP/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:
src/GCP/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"],});GlossariesCategory
Section titled “GlossariesCategory”Source:
src/GCP/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" },});GlossariesTerm
Section titled “GlossariesTerm”Source:
src/GCP/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" },});Glossary
Section titled “Glossary”Source:
src/GCP/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" },});Source:
src/GCP/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" },});LakesAsset
Section titled “LakesAsset”Source:
src/GCP/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 },});LakesEntitiesPartition
Section titled “LakesEntitiesPartition”Source:
src/GCP/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:
src/GCP/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" }], },});LakesTask
Section titled “LakesTask”Source:
src/GCP/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" },});LakesZone
Section titled “LakesZone”Source:
src/GCP/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 },});MetadataFeed
Section titled “MetadataFeed”Source:
src/GCP/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"] },});