Deploy the demo for the first time¶
This guide creates the project catalog and fixed v1 secret, provisions the three persona groups,
builds all governed relations, and applies the access contract.
Use it once for a new target. For routine job deployment, use Deploy and run the Databricks bundle.
Prerequisites¶
Complete Configure a development environment. The
authenticated caller must be allowed to create a Unity Catalog catalog, account groups and users,
SQL functions, and the Databricks secret scope. openssl is required to generate the pepper.
Load the reviewed target values:
Danger
The example environment targets the canonical bricksgdpr catalog. Confirm
DBT_PROJECT_CATALOG, DATABRICKS_EXPECTED_HOST, and DATABRICKS_EXPECTED_CALLER before any
mutating command.
Create the catalog¶
The operation executes create catalog if not exists for DBT_PROJECT_CATALOG.
Check for an existing v1 pepper¶
List the secret scopes first:
If bricksgdpr is absent, create it:
Now list the keys in that scope:
Danger
If pepper_v1 appears, stop. Do not run put-secret: that command can overwrite an existing
value, which would silently change the meaning of every future v1: key.
Create the v1 pepper once¶
Only after confirming that pepper_v1 is absent, create it:
The command pipes the generated secret directly to Databricks. It does not belong in .env, dbt
variables, logs, tags, or tables.
Warning
Never overwrite bricksgdpr/pepper_v1 in place. The pseudonymize_personal_data_v1 function
and every v1: key depend on that immutable pairing. Rotation requires a new versioned key,
wrapper, and parallel columns.
The repository references the fixed scope and key, but it does not prevent an operator from
overwriting the secret or test the secret-scope ACL. Immutability and the rule that only the
deployment identity receives secret READ are external operator controls that must be reviewed
and audited separately.
Provision the persona topology¶
Follow Provision persona identities. For the repository-owned demo users, select synthetic mode and return here after the post-apply preflight passes.
Build relations and reconcile privileges¶
Run the sequence in this order:
uv run dbt build --exclude tag:access_control
uv run dbt run-operation apply_access_controls
uv run dbt test --select tag:access_control
uv run dbt build
The initial build creates the relations and applies their relation-level SELECT grants. The
operation then grants required parent USE privileges and revokes broad or internal-function
access. The access tests compare live Unity Catalog metadata with the exact allowlist.
Validate the data plane¶
This creates three temporary service principals, runs the positive and expected-denial SQL tasks, then deletes the principals and uploaded workspace files. See Validate persona access before running it.
Confirm the deployment¶
Use Build and explore the demo to check the current fixture counts and inspect the governed layers.
For the exact schema and reader matrix, consult Catalogs and schemas. Read Demo and production boundaries before adapting this single-deployer target to a shared environment.