bricksentry 0.1.13__tar.gz → 0.1.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bricksentry-0.1.13 → bricksentry-0.1.15}/CHANGELOG.md +18 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/PKG-INFO +29 -2
- {bricksentry-0.1.13 → bricksentry-0.1.15}/README.md +28 -1
- bricksentry-0.1.15/deploy/databricks-app/app.yaml +10 -0
- bricksentry-0.1.15/deploy/databricks-app/bricksentry.yml +21 -0
- bricksentry-0.1.15/deploy/databricks-app/databricks.yml +26 -0
- bricksentry-0.1.15/deploy/databricks-app/grants.sql +19 -0
- bricksentry-0.1.15/deploy/databricks-app/requirements.txt +1 -0
- bricksentry-0.1.15/examples/databricks/bricksentry_hr_walkthrough.ipynb +552 -0
- bricksentry-0.1.15/examples/databricks/bricksentry_hr_walkthrough.py +413 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/pyproject.toml +2 -2
- {bricksentry-0.1.13 → bricksentry-0.1.15}/scripts/build_notebook.py +1 -0
- bricksentry-0.1.15/server.json +41 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/__init__.py +1 -1
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/assess.py +18 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/backends/base.py +12 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/backends/databricks_backend.py +28 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/cli.py +61 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/config.py +9 -2
- bricksentry-0.1.15/src/bricksentry/history.py +183 -0
- bricksentry-0.1.15/src/bricksentry/job.py +190 -0
- bricksentry-0.1.15/templates/job-check/README.md +13 -0
- bricksentry-0.1.15/templates/job-check/databricks_template_schema.json +78 -0
- bricksentry-0.1.15/templates/job-check/template/{{.project_name}}/.gitignore +2 -0
- bricksentry-0.1.15/templates/job-check/template/{{.project_name}}/README.md.tmpl +68 -0
- bricksentry-0.1.15/templates/job-check/template/{{.project_name}}/databricks.yml.tmpl +14 -0
- bricksentry-0.1.15/templates/job-check/template/{{.project_name}}/resources/bricksentry_check.job.yml.tmpl +54 -0
- bricksentry-0.1.15/templates/job-check/template/{{.project_name}}/src/bricksentry_check.py +7 -0
- bricksentry-0.1.15/tests/test_0114.py +377 -0
- bricksentry-0.1.15/tests/test_hr_notebook.py +188 -0
- bricksentry-0.1.13/packages/bricksentry-mcp/LICENSE +0 -202
- bricksentry-0.1.13/packages/bricksentry-mcp/README.md +0 -32
- bricksentry-0.1.13/packages/bricksentry-mcp/src/bricksentry_mcp/__init__.py +0 -5
- {bricksentry-0.1.13 → bricksentry-0.1.15}/.gitignore +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/CONTRIBUTING.md +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/LICENSE +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/SECURITY.md +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/action.yml +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/deploy/databricks-app/README.md +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/bricksentry.yml +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/bricksentry_check_my_table.ipynb +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/bricksentry_check_my_table.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/bricksentry_quickstart.ipynb +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/bricksentry_quickstart.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/github-workflow.yml +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/databricks/policy.yml +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/examples/demo/agent_loop_demo.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/__main__.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/agent_tools.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/backends/__init__.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/backends/duckdb_backend.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/changes.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/demo.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/diff.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/explain.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/github.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/lineage.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/mcp_server.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/measures.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/models.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/notify.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/policy.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/policy_templates.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/preview.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/py.typed +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/src/bricksentry/report.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/conftest.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_0110.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_0112.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_018.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_019.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_assess_policy.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_check_notebook.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_databricks_and_uc.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_demo.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_diff.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_notebook.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_notify_templates.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_preview_agents.py +0 -0
- {bricksentry-0.1.13 → bricksentry-0.1.15}/tests/test_sample_guard_and_store.py +0 -0
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.15 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
From the first live test of the 0.1.14 job template on Databricks serverless (deployed with `databricks bundle deploy`, started by the table update trigger and by hand):
|
|
6
|
+
|
|
7
|
+
- Fix: every run of the job task was marked failed, even "pass" and "nothing to check", because Databricks treats any `SystemExit` from a Python script task as an error, including exit code 0. `python -m bricksentry.job` now only exits when the task should fail (verdict at or above `--fail-on`, or an error).
|
|
8
|
+
- The bundle template now asks for key columns (`keys`, e.g. `main.hr.employees=employee_id`), for tables without a `PRIMARY KEY`. Before, those runs failed with "No key columns" until `--key` was added by hand. The job task takes several at once with `--keys "t1=a,b; t2=c"`.
|
|
9
|
+
- The template's task sets `max_retries: 0`, so a `block` verdict fails the run once instead of being retried.
|
|
10
|
+
- Fix: the source distribution on PyPI had only some of the bundle template's files (and the Databricks App kit was missing). It now includes `templates/` and `deploy/` in full.
|
|
11
|
+
|
|
12
|
+
## 0.1.14 (2026-11-11)
|
|
13
|
+
|
|
14
|
+
Zero-friction adoption: check every pipeline run without changing the pipeline.
|
|
15
|
+
|
|
16
|
+
- **`bricksentry check-last-change <table>`** checks a change that already landed, from the table's Delta history. It finds the newest data change (WRITE, MERGE, UPDATE, DELETE, COPY INTO, ...; OPTIMIZE and VACUUM are skipped), compares the version before with the version after (two shallow clones in `sandbox_schema`, dropped afterwards), runs lineage and policy, sends the alert, and prints the `RESTORE` that undoes it. `--version N` checks a specific version; `--since TIME` checks everything after that time as one change, e.g. all a job run wrote. Keys come from config, `--key`, or the table's `PRIMARY KEY`. Python: `Sentry.check_change(table)`.
|
|
17
|
+
- **Asset Bundle template** in `templates/job-check`: `databricks bundle init https://github.com/bricksentry/bricksentry --template-dir templates/job-check` creates a serverless job with a table update trigger that checks every change to up to 10 tables, alerts on Slack (webhook read from a secret scope) and fails the run at the verdict you choose. Its README shows how to add the check as a task inside an existing job so a `block` stops the downstream tasks.
|
|
18
|
+
- **`python -m bricksentry.job`**: the job-task entry point used by the template. Takes the table list the trigger provides, a Slack or Teams webhook from a secret scope, and a link back to the run for the alert.
|
|
19
|
+
- Fix: in `bricksentry.yml`, `notify: {on: block}` was ignored, because YAML reads an unquoted `on` key as `true`. It is now read correctly (quoting it was the workaround).
|
|
20
|
+
|
|
3
21
|
## 0.1.13 (2026-11-11)
|
|
4
22
|
|
|
5
23
|
From the first live test of column lineage on Databricks (the 0.1.12 column features were verified against real `system.access.column_lineage` and column tags):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bricksentry
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.15
|
|
4
4
|
Summary: Change-safety for Databricks pipelines and the AI agents that edit them: data diffs, Unity Catalog blast radius, policy verdicts and rollback plans.
|
|
5
5
|
Project-URL: Homepage, https://bricksentry.org
|
|
6
6
|
Project-URL: Documentation, https://bricksentry.org/docs
|
|
@@ -83,6 +83,32 @@ Point the [check-my-table notebook](examples/databricks/bricksentry_check_my_tab
|
|
|
83
83
|
|
|
84
84
|
If it shows you something, please [share what it found](https://github.com/bricksentry/bricksentry/issues/new?template=it_caught_this.yml) (no table names needed). Real results decide what gets built next.
|
|
85
85
|
|
|
86
|
+
### Check every pipeline run automatically (Asset Bundle, 5 minutes)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
databricks bundle init https://github.com/bricksentry/bricksentry --template-dir templates/job-check
|
|
90
|
+
cd bricksentry_check && databricks bundle deploy -t prod
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Answer a few prompts (tables to watch, SQL warehouse, scratch schema, policy, optional Slack webhook secret). You get a serverless job with a **table update trigger**: whenever a watched table changes, it checks the change, sends the alert and logs the `RESTORE` that undoes it. To stop downstream tasks when a change is bad, add the same check as a task inside your pipeline job, right after the write (the generated README shows the YAML): with `--since {{job.start_time.iso_datetime}}` it checks everything the run wrote, and a `block` verdict fails the task so the tasks after it don't run.
|
|
94
|
+
|
|
95
|
+
From the command line, the same check is one command:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bricksentry check-last-change main.sales.orders # newest data change vs the version before
|
|
99
|
+
bricksentry check-last-change main.sales.orders --version 42 # a specific version
|
|
100
|
+
bricksentry check-last-change main.sales.orders --since 2026-11-11T09:00:00Z --fail-on needs_human
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Keys come from `bricksentry.yml`, `--key`, or the table's `PRIMARY KEY` constraint. OPTIMIZE and VACUUM commits are skipped because they don't change data.
|
|
104
|
+
|
|
105
|
+
### Every feature on an HR pipeline
|
|
106
|
+
|
|
107
|
+
> **HR walkthrough notebook:** Workspace → Import → URL →
|
|
108
|
+
> `https://raw.githubusercontent.com/bricksentry/bricksentry/main/examples/databricks/bricksentry_hr_walkthrough.py`
|
|
109
|
+
|
|
110
|
+
The [HR walkthrough](examples/databricks/bricksentry_hr_walkthrough.py) builds a 200,000-row employee table (tagged pii) feeding a certified pay summary, then shows everything bricksentry does on it: table and column blast radius, two pull requests (one risky, one broken), every rule, an agent's write previewed on a clone with dangerous SQL refused, the PR report, column-level policies, sampling that can't hide a duplicate, lineage from config, alerts and the MCP tools. It removes everything it created at the end. First run on a live workspace by Genie, an AI agent in Databricks, in November 2026.
|
|
111
|
+
|
|
86
112
|
### Guided tour on demo data
|
|
87
113
|
|
|
88
114
|
> **Databricks quickstart notebook:** in your workspace, go to **Workspace → Import → URL** and paste
|
|
@@ -185,6 +211,7 @@ bricksentry diff main.sales.orders main.sales_pr_42.orders
|
|
|
185
211
|
bricksentry preview main.sales.orders --sql "MERGE INTO {{target}} t USING updates u ON t.order_id = u.order_id WHEN MATCHED THEN UPDATE SET *"
|
|
186
212
|
bricksentry assess --from-git origin/main --pr 42 --format markdown --fail-on needs_human
|
|
187
213
|
bricksentry rollback main.sales.orders
|
|
214
|
+
bricksentry check-last-change main.sales.orders # the change a pipeline already made
|
|
188
215
|
```
|
|
189
216
|
|
|
190
217
|
Exit codes: `0` below `--fail-on`, `1` at or above it, `2` for configuration errors.
|
|
@@ -393,7 +420,7 @@ All conditions in a `when` must hold. The most severe matching rule sets the ver
|
|
|
393
420
|
- `CAN USE` on a SQL warehouse.
|
|
394
421
|
- `SELECT` on the tables you assess and their candidates.
|
|
395
422
|
- `SELECT` on `system.access.table_lineage` (and `system.access.column_lineage` for column-level impact), plus `system.information_schema` for owners, table tags and column tags. Without lineage access bricksentry still diffs, and adds a `lineage-unavailable` warning (blast radius unknown) instead of guessing.
|
|
396
|
-
- `CREATE TABLE` on `sandbox_schema`, for `preview_write`.
|
|
423
|
+
- `CREATE TABLE` on `sandbox_schema`, for `preview_write` and `check-last-change`. `check-last-change` also needs the table's Delta history (versions not yet removed by `VACUUM`).
|
|
397
424
|
|
|
398
425
|
## Known limits (v0.1.x)
|
|
399
426
|
|
|
@@ -36,6 +36,32 @@ Point the [check-my-table notebook](examples/databricks/bricksentry_check_my_tab
|
|
|
36
36
|
|
|
37
37
|
If it shows you something, please [share what it found](https://github.com/bricksentry/bricksentry/issues/new?template=it_caught_this.yml) (no table names needed). Real results decide what gets built next.
|
|
38
38
|
|
|
39
|
+
### Check every pipeline run automatically (Asset Bundle, 5 minutes)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
databricks bundle init https://github.com/bricksentry/bricksentry --template-dir templates/job-check
|
|
43
|
+
cd bricksentry_check && databricks bundle deploy -t prod
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Answer a few prompts (tables to watch, SQL warehouse, scratch schema, policy, optional Slack webhook secret). You get a serverless job with a **table update trigger**: whenever a watched table changes, it checks the change, sends the alert and logs the `RESTORE` that undoes it. To stop downstream tasks when a change is bad, add the same check as a task inside your pipeline job, right after the write (the generated README shows the YAML): with `--since {{job.start_time.iso_datetime}}` it checks everything the run wrote, and a `block` verdict fails the task so the tasks after it don't run.
|
|
47
|
+
|
|
48
|
+
From the command line, the same check is one command:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bricksentry check-last-change main.sales.orders # newest data change vs the version before
|
|
52
|
+
bricksentry check-last-change main.sales.orders --version 42 # a specific version
|
|
53
|
+
bricksentry check-last-change main.sales.orders --since 2026-11-11T09:00:00Z --fail-on needs_human
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Keys come from `bricksentry.yml`, `--key`, or the table's `PRIMARY KEY` constraint. OPTIMIZE and VACUUM commits are skipped because they don't change data.
|
|
57
|
+
|
|
58
|
+
### Every feature on an HR pipeline
|
|
59
|
+
|
|
60
|
+
> **HR walkthrough notebook:** Workspace → Import → URL →
|
|
61
|
+
> `https://raw.githubusercontent.com/bricksentry/bricksentry/main/examples/databricks/bricksentry_hr_walkthrough.py`
|
|
62
|
+
|
|
63
|
+
The [HR walkthrough](examples/databricks/bricksentry_hr_walkthrough.py) builds a 200,000-row employee table (tagged pii) feeding a certified pay summary, then shows everything bricksentry does on it: table and column blast radius, two pull requests (one risky, one broken), every rule, an agent's write previewed on a clone with dangerous SQL refused, the PR report, column-level policies, sampling that can't hide a duplicate, lineage from config, alerts and the MCP tools. It removes everything it created at the end. First run on a live workspace by Genie, an AI agent in Databricks, in November 2026.
|
|
64
|
+
|
|
39
65
|
### Guided tour on demo data
|
|
40
66
|
|
|
41
67
|
> **Databricks quickstart notebook:** in your workspace, go to **Workspace → Import → URL** and paste
|
|
@@ -138,6 +164,7 @@ bricksentry diff main.sales.orders main.sales_pr_42.orders
|
|
|
138
164
|
bricksentry preview main.sales.orders --sql "MERGE INTO {{target}} t USING updates u ON t.order_id = u.order_id WHEN MATCHED THEN UPDATE SET *"
|
|
139
165
|
bricksentry assess --from-git origin/main --pr 42 --format markdown --fail-on needs_human
|
|
140
166
|
bricksentry rollback main.sales.orders
|
|
167
|
+
bricksentry check-last-change main.sales.orders # the change a pipeline already made
|
|
141
168
|
```
|
|
142
169
|
|
|
143
170
|
Exit codes: `0` below `--fail-on`, `1` at or above it, `2` for configuration errors.
|
|
@@ -346,7 +373,7 @@ All conditions in a `when` must hold. The most severe matching rule sets the ver
|
|
|
346
373
|
- `CAN USE` on a SQL warehouse.
|
|
347
374
|
- `SELECT` on the tables you assess and their candidates.
|
|
348
375
|
- `SELECT` on `system.access.table_lineage` (and `system.access.column_lineage` for column-level impact), plus `system.information_schema` for owners, table tags and column tags. Without lineage access bricksentry still diffs, and adds a `lineage-unavailable` warning (blast radius unknown) instead of guessing.
|
|
349
|
-
- `CREATE TABLE` on `sandbox_schema`, for `preview_write`.
|
|
376
|
+
- `CREATE TABLE` on `sandbox_schema`, for `preview_write` and `check-last-change`. `check-last-change` also needs the table's Delta history (versions not yet removed by `VACUUM`).
|
|
350
377
|
|
|
351
378
|
## Known limits (v0.1.x)
|
|
352
379
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Databricks Apps entry point for the bricksentry MCP server.
|
|
2
|
+
# The app listens on $DATABRICKS_APP_PORT (bricksentry picks it up) and serves MCP at /mcp.
|
|
3
|
+
# --read-only leaves out preview_write, so agents can check changes but the app never writes.
|
|
4
|
+
# Remove it to allow previews on sandbox clones (needs CREATE TABLE on sandbox_schema, see grants.sql).
|
|
5
|
+
command: ["bricksentry", "mcp", "--transport", "streamable-http", "--read-only", "--config", "bricksentry.yml"]
|
|
6
|
+
env:
|
|
7
|
+
- name: DATABRICKS_WAREHOUSE_ID
|
|
8
|
+
valueFrom: sql-warehouse # the SQL warehouse resource added to the app
|
|
9
|
+
- name: BRICKSENTRY_STORE
|
|
10
|
+
value: /tmp/bricksentry/assessments
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# bricksentry config for the Databricks App. The warehouse comes from the app's
|
|
2
|
+
# sql-warehouse resource (DATABRICKS_WAREHOUSE_ID); auth is the app's service principal.
|
|
3
|
+
backend:
|
|
4
|
+
type: databricks
|
|
5
|
+
lineage:
|
|
6
|
+
type: databricks
|
|
7
|
+
depth: 3
|
|
8
|
+
lookback_days: 90
|
|
9
|
+
sandbox_schema: main.bricksentry_sandbox # only used if you remove --read-only from app.yaml
|
|
10
|
+
policy: builtin:agent-safe # see `bricksentry policies`
|
|
11
|
+
|
|
12
|
+
# Tables agents may assess, with the keys that identify a row.
|
|
13
|
+
# assess_change needs keys for a table; preview_write can also take them as an argument.
|
|
14
|
+
tables:
|
|
15
|
+
main.sales.orders:
|
|
16
|
+
keys: [order_id]
|
|
17
|
+
|
|
18
|
+
# Optional: post needs_human / block verdicts to Slack. Add the webhook as an app secret
|
|
19
|
+
# and expose it with `valueFrom` in app.yaml, then uncomment:
|
|
20
|
+
# notify:
|
|
21
|
+
# slack_webhook: env:BRICKSENTRY_SLACK_WEBHOOK
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Deploy with Databricks Asset Bundles:
|
|
2
|
+
# databricks bundle deploy --var warehouse_id=<your-sql-warehouse-id>
|
|
3
|
+
# databricks bundle run bricksentry_mcp
|
|
4
|
+
bundle:
|
|
5
|
+
name: bricksentry-mcp
|
|
6
|
+
|
|
7
|
+
variables:
|
|
8
|
+
warehouse_id:
|
|
9
|
+
description: SQL warehouse bricksentry runs its checks on
|
|
10
|
+
|
|
11
|
+
resources:
|
|
12
|
+
apps:
|
|
13
|
+
bricksentry_mcp:
|
|
14
|
+
name: mcp-bricksentry
|
|
15
|
+
description: bricksentry MCP server - checks what a data change does before it ships
|
|
16
|
+
source_code_path: .
|
|
17
|
+
resources:
|
|
18
|
+
- name: sql-warehouse
|
|
19
|
+
sql_warehouse:
|
|
20
|
+
id: ${var.warehouse_id}
|
|
21
|
+
permission: CAN_USE
|
|
22
|
+
|
|
23
|
+
targets:
|
|
24
|
+
dev:
|
|
25
|
+
default: true
|
|
26
|
+
mode: development
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- Grants for the bricksentry app's service principal.
|
|
2
|
+
-- Find its application ID on the app's page (Authorization tab, "Service principal"),
|
|
3
|
+
-- then replace `<app-sp>` below. Adjust catalogs and schemas to the tables agents will check.
|
|
4
|
+
|
|
5
|
+
-- Tables bricksentry may read (the base tables and the candidate tables your CI builds)
|
|
6
|
+
GRANT USE CATALOG ON CATALOG main TO `<app-sp>`;
|
|
7
|
+
GRANT USE SCHEMA ON SCHEMA main.sales TO `<app-sp>`;
|
|
8
|
+
GRANT SELECT ON SCHEMA main.sales TO `<app-sp>`;
|
|
9
|
+
|
|
10
|
+
-- Blast radius: Unity Catalog lineage. Without it, checks still run and add a
|
|
11
|
+
-- lineage-unavailable warning.
|
|
12
|
+
GRANT USE CATALOG ON CATALOG system TO `<app-sp>`;
|
|
13
|
+
GRANT USE SCHEMA ON SCHEMA system.access TO `<app-sp>`;
|
|
14
|
+
GRANT SELECT ON TABLE system.access.table_lineage TO `<app-sp>`;
|
|
15
|
+
GRANT SELECT ON TABLE system.access.column_lineage TO `<app-sp>`; -- column-level impact
|
|
16
|
+
|
|
17
|
+
-- Only if you remove --read-only from app.yaml: previews run on shallow clones here.
|
|
18
|
+
-- CREATE SCHEMA IF NOT EXISTS main.bricksentry_sandbox;
|
|
19
|
+
-- GRANT USE SCHEMA, CREATE TABLE ON SCHEMA main.bricksentry_sandbox TO `<app-sp>`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bricksentry[databricks,mcp]==0.1.15
|