Skip to content

GCP.DataCatalog reference

Source: src/GCP/DataCatalog/TagTemplate.ts

A Data Catalog tag template — a schema for tags attached to catalog entries.

Tag templates have no labels field. Alchemy stamps ownership into a reserved alchemy_ownership field description so list / nuke can identify owned templates. Id and location are immutable. Display name, public readability, and fields update in place (field types other than adding enum values require deleting and recreating the field).

Generated id with a string field

const template = yield* GCP.DataCatalog.TagTemplate("Source", {
displayName: "Source",
fields: {
origin: {
displayName: "Origin",
type: { primitiveType: "STRING" },
},
},
});

Explicit id

const template = yield* GCP.DataCatalog.TagTemplate("Source", {
tagTemplateId: "source_template",
location: "us-central1",
displayName: "Source",
});
// Same logical id, changed props: the engine updates it in place.
const template = yield* GCP.DataCatalog.TagTemplate("Source", {
displayName: "Source v2",
fields: {
origin: {
displayName: "Origin system",
type: { primitiveType: "STRING" },
},
},
});

Source: src/GCP/DataCatalog/TaxonomiesPolicyTag.ts

A Data Catalog policy tag inside a taxonomy.

Policy tag ids are assigned by Policy Tag Manager. Taxonomy and parent tag are immutable. Display name and description update in place. Policy tags have no labels; Alchemy stamps ownership into the description so list / nuke can find them.

TaxonomiesPolicyTag: Creating a Policy Tag

Section titled “TaxonomiesPolicyTag: Creating a Policy Tag”
const tag = yield* GCP.DataCatalog.TaxonomiesPolicyTag("Email", {
taxonomy: taxonomy.name,
displayName: "email",
description: "email addresses",
});

Source: src/GCP/DataCatalog/Taxonomy.ts

A Data Catalog taxonomy — a hierarchy of policy tags used to classify data (for example PII vs financials).

Taxonomy ids are assigned by Policy Tag Manager. Location is immutable. Display name, description, and activated policy types update in place. Taxonomies have no labels; Alchemy stamps alchemy-stack / alchemy-stage / alchemy-id into the description so list and pnpm nuke:gcp can identify owned taxonomies.

Generated display name

const taxonomy = yield* GCP.DataCatalog.Taxonomy("Pii", {
description: "sensitivity classes",
});

Fine-grained access control

const taxonomy = yield* GCP.DataCatalog.Taxonomy("Pii", {
displayName: "PII",
activatedPolicyTypes: ["FINE_GRAINED_ACCESS_CONTROL"],
});
// Same logical id, changed props: the engine updates it in place.
const taxonomy = yield* GCP.DataCatalog.Taxonomy("Pii", {
displayName: "PII",
description: "sensitivity classes v2",
activatedPolicyTypes: ["FINE_GRAINED_ACCESS_CONTROL"],
});