Skip to content

GCP.Dataplex reference

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.

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" },
},
],
},
});

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" },
});

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.

const domain = yield* GCP.Dataplex.DataDomain("Finance", {
displayName: "Finance",
labels: { env: "test" },
contacts: {
identities: [
{
contactName: "steward",
contactRole: "steward",
contactId: "steward@example.com",
},
],
},
});

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",
});

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.

const product = yield* GCP.Dataplex.DataProduct("Sales", {
displayName: "Sales mart",
ownerEmails: ["owner@example.com"],
labels: { env: "test" },
});

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" },
});

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.

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: {},
});

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" },
});

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.

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" },
});
// 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" },
});

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",
});

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.

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" },
});
// 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" },
});

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.

const entry = yield* GCP.Dataplex.EntryGroupsEntry("Orders", {
entryGroup: group.name,
entryType:
"projects/dataplex-types/locations/global/entryTypes/generic",
labels: { env: "prod" },
});
// 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" },
});

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" },
],
});

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.

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" },
});
// 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"],
});

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" },
});

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.

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" },
});

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.

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" },
});
// 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.

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" },
});

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.

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 },
});

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`,
});

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.

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" }],
},
});

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.

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" },
});

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.

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 },
});

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.

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"] },
});