databricks
Skill17 starsChanged 55 days agoMITView on GitHub
Databricks playbook. Workflows for workspace bootstrap, Unity Catalog migration, Lakeflow Spark Declarative Pipelines (formerly Delta Live Tables / DLT), Declarative Automation Bundles (formerly Databricks Asset Bundles), cluster policies/access modes, serverless SQL and jobs, Photon and cost tuning, governance audit, Mosaic AI/MLflow, and recovery via Delta time travel. Use when designing, operating, or auditing Databricks.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Nov 8, 2026
- fmind/dotfilestheir own version, first seen Nov 8, 2026
- databricks/devhubtheir own version, first seen Mar 16, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- databricks/devhub★ 29same name
- fmind/dot★ 13same name
- fmind/dotfiles★ 13same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- agents-sdkSkill
- agent-workflowSkill
- api-designSkill
- aws-iamSkill
- bash-shell-scriptingSkill
- cicd-github-actionsSkill
- cloudflare-email-serviceSkill
- cloudflareSkill
- cloudflare-waf-authorSkill
- cloudflare-workers-authorSkill
- cloud-platformsSkill
- codebase-security-auditSkill
- containers-orchestrationSkill
- core-engineeringSkill
- database-postgresqlSkill
- data-engineeringSkill
- distributed-transactionsSkill
- documentation-standardsSkill
- domain-driven-designSkill
- durable-objectsSkill
- frontend-engineeringSkill
- git-workflowSkill
- go-rust-systemsSkill
- iam-security-advisorSkill
- independent-verificationSkill
- infrastructure-iacSkill
- kubernetes-containersSkill
- kubernetes-operator-developmentSkill
- mcp-developmentSkill
- memory-architectureSkill
- multi-perspective-reviewSkill
- networking-transportSkill
- observabilitySkill
- oktaSkill
- pdf-exportSkill
- python-developmentSkill
- reactflow-architecture-diagramsSkill
- sandbox-sdkSkill
- scripting-automationSkill
- security-testingSkill
- service-resilienceSkill
- single-file-dashboardSkill
- skills-compositionSkill
- skills-continuous-improvementSkill
- snowflakeSkill
- system-designSkill
- typescript-javascriptSkill
- web-perfSkill
- web-research-kb-refreshSkill
- workers-best-practicesSkill
- workload-identitySkill
- wranglerSkill
- zero-trustSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. 0 are common, 24 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
24
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use when the user is:
- Distinctive: line 39
Every notebook / repo change runs in CI: before it runs against prod data.
- Very specific: line 47
No persistent DBFS mounts (dbfs:/mnt/...) for governed production data.
- Distinctive: line 48
No personal access tokens in production automation.
- Distinctive: line 76
Keep global admin list tiny
- Distinctive: line 81
Default grants minimal; team-specific access roles
- Distinctive: line 101
All databases / tables in Hive
- Distinctive: line 111
Dual-write during transition: write to both Hive and UC, read from UC, retire Hive
- Distinctive: line 114
Add tags for sensitivity, owner, data steward
- Distinctive: line 120
Update SQL Warehouses to use UC as default catalog
- Very specific: line 121
Update notebooks / jobs to reference catalog.schema.table three-part names
- Distinctive: line 176
Use schema-level managed locations for regulated data requiring physical isolation.
- Distinctive: line 230
Prefer ABAC for enterprise scale: governed tags + inheritable policies beat per-table copy/paste filters and masks.
- Distinctive: line 406
No public workspace access from the internet (IP ACLs, Private Access)
- Very specific: line 422
Use when notebooks/files/workspace assets exist only in the Databricks workspace and are not yet in a Git folder or repo.
- Distinctive: line 452
remove generated output/noise before committing
- Distinctive: line 453
do not export secrets, outputs containing credentials, or ad-hoc data dumps
- Distinctive: line 460
Lock down workspace edits: after migration:
- Distinctive: line 475
Use Declarative Automation Bundles (formerly Databricks Asset Bundles) for deployable Databricks projects.
- Distinctive: line 483
Run smoke/integration tests against a dev catalog.
- Distinctive: line 498
Use MLflow model registry under Unity Catalog where available.
- Distinctive: line 499
Use service principals for scheduled training / serving jobs.
- Distinctive: line 500
Use Dedicated access mode only when ML runtime, GPUs, R, or unsupported Standard-mode APIs require it.
- Very specific: line 502
Keep prompt/RAG/vector-search artifacts under governed catalogs, schemas, and volumes.
- Very specific: line 528
Test RESTORE in dev; have a runbook
- Distinctive: line 536
No cluster policies (users pick 32-worker XL for ad-hoc queries)
- Distinctive: line 541
No Photon on compute that would benefit
- Distinctive: line 543
No cost dashboard; surprise bill each month
- Distinctive: line 546
No system tables or audit export in production workspaces
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Databricks - Playbook
Companion rule: 481-databricks.mdc. This skill turns those patterns into end-to-end workflows.
[!NOTE] Current Databricks names: Lakeflow Spark Declarative Pipelines is the current name for Delta Live Tables (DLT). Declarative Automation Bundles is the current name for Databricks Asset Bundles (DABs). Existing DLT/DAB code and docs still work, but new guidance should use the current names and mention the former names for searchability.
When to invoke
Use when the user is:
- Bootstrapping a new Databricks workspace or account
- Migrating to Unity Catalog (from Hive metastore or no-governance state)
- Designing or reviewing a Lakeflow Spark Declarative Pipeline (formerly DLT)
- Deploying jobs, notebooks, and pipelines with Declarative Automation Bundles
- Setting cluster policies or rolling out Serverless / SQL Warehouses
- Tuning cost (cluster sizing, Photon, spot, job compute vs all-purpose)
- Governing data (Unity Catalog, tags, access control, lineage)
- Recovering from a bad change (Delta time travel /
RESTORE) - Hardening access (SCIM, SSO, service principals, OAuth tokens)
Golden Rules
- Unity Catalog is the default. Hive metastore is for legacy migration only.
- Service principals and OAuth, not personal access tokens, for automation.
- Standard access mode by default. Dedicated access mode only when the workload requires it; no-isolation shared is not acceptable for governed production.
- Job compute for jobs. All-purpose clusters are for exploration.
- Delta is the default table format; Delta Lake for Spark, Delta tables under Unity Catalog.
- Lineage and tags are not optional - govern at ingest, not post hoc.
- Every notebook / repo change runs in CI before it runs against prod data.
- Declarative Automation Bundles deploy projects; Terraform provisions account/workspace infrastructure.
- System tables are operational infrastructure for cost, audit, lineage, and query history.
Non-Negotiables
- Production data uses Unity Catalog: three-part names, group/service-principal ownership, governed external locations or volumes.
- Catalog topology maps to business domain, environment, region/data residency, and workspace binding requirements before production objects are created.
- No persistent DBFS mounts (
dbfs:/mnt/...) for governed production data. - No personal access tokens in production automation.
- No
account usersgrants, individual owners, or broadALL PRIVILEGESgrants without documented exception. BROWSE,APPLY TAG, andMANAGEare metadata-only capabilities; do not confuse them with data access.- Standard access mode is the default. Dedicated access mode must state the technical reason.
- Deployable jobs and Lakeflow pipelines use Declarative Automation Bundles with
databricks bundle validatein CI. - Serverless SQL / jobs / Lakeflow are preferred where available and appropriate; classic clusters require a reason and a policy.
- PII/PCI/sensitive tables require tags, masks, row filters, and audit visibility before gold/serving publication.
Workflow 1 - Workspace Bootstrap
Stand up a new workspace with governance, security, and cost controls from day one.
Steps
- Account-level setup:
- Account console used for identity, Unity Catalog metastore, and workspace provisioning
- SSO via Okta / Entra ID / Google with SCIM provisioning
- Admin role in a small, audited group
- Unity Catalog metastore per region, tied to cloud storage location (one per region, one per env optionally)
- Workspace deployment via Terraform (
databricksprovider):- Network: private subnets, VPC endpoints / Private Link
- Customer-managed keys for notebooks and workspace storage
- Workspace bound to specific metastore
- Groups and access (via SCIM from IdP):
admins-<workspace>- workspace adminsdata-engineers-<env>,data-analysts-<env>,data-scientists-<env>,platform-<env>- Keep global admin list tiny
- Cluster policies (see Workflow 4) for all user-facing compute
- Catalog structure:
- Catalogs per environment (
dev,stage,prod) or per domain (sales,marketing) - Schemas within:
raw,staging,curated,sandbox - Default grants minimal; team-specific access roles
- Catalogs per environment (
- External locations + storage credentials (Unity Catalog) for cloud object storage; no direct S3/ADLS/GCS creds in notebooks
- Budget and alerts:
- System tables for billing (
system.billing.usage) - Dashboards for cost by workspace / cluster / user / job
- Alerts on spend anomalies
- System tables for billing (
Deliverable: Terraform modules (account, workspace, UC, groups, policies), bootstrap runbook, cost dashboard.
See references/workspace-bootstrap.md.
Workflow 2 - Unity Catalog Migration
Migrate from Hive metastore (or no governance) to Unity Catalog.
Steps
- Inventory:
- All databases / tables in Hive
- Locations (mount points,
dbfs:/mnt/..., direct S3 paths) - Access patterns (who reads / writes)
- Data pipelines depending on Hive paths
- Metastore setup (if not already done).
- External locations in Unity Catalog for the cloud storage backing the Hive tables.
- Catalog and schema creation that mirrors the source structure (or a better one).
- Migration options:
- Upgrade in place:
SYNCcommand for schemas, orCREATE TABLE ... LIKE ... LOCATION ...to point UC tables at existing storage - Copy:
CREATE TABLE ... AS SELECT ...into new UC tables (physical re-write; expensive but clean) - Dual-write during transition: write to both Hive and UC, read from UC, retire Hive
- Upgrade in place:
- Lineage and ownership:
- Set UC owner to a group, not a person
- Add tags for sensitivity, owner, data steward
- Access control:
- Grants at catalog / schema / table level
- No
ANONYMOUS FUNCTION/ALL PRIVILEGESsprawl - Column-level masking / row filters where needed
- Cut over pipelines and BI:
- Update SQL Warehouses to use UC as default catalog
- Update notebooks / jobs to reference
catalog.schema.tablethree-part names - Disable Hive metastore access path after validation
- Decommission Hive once all reads have moved.
Deliverable: Migration plan per database, cutover runbook, rollback plan, governance model (owners, stewards, tags, classifications).
Workflow 3 - Catalog Topology and Delegated Ownership
Translate organization structure into catalogs, schemas, workspaces, storage, and ownership.
Design dimensions
- Metastore / region strategy: one metastore per cloud-region; use Delta Sharing for cross-region/cross-cloud sharing.
- Catalog boundary: business unit, domain, environment, region, or shared data product.
- Workspace binding: which workspaces can see/use each catalog.
- Storage boundary: metastore, catalog, or schema managed location; external location for externally managed data.
- Ownership and delegation: group/service-principal owners,
MANAGEdelegation, data stewards.
Topology patterns
| Pattern | Example | Use when |
| Direct separation | finance_prod, finance_stage, finance_dev | Environment isolation and workspace binding matter most |
| Indirect separation | finance catalog with prod_*, stage_*, dev_* schemas | Fewer catalogs and team autonomy matter more |
| Region + domain | emea_finance_prod, apac_sales_prod | Data residency or regional governance is a hard boundary |
| Shared reference | shared_reference_prod | Cross-domain data products or common dimensions |
Ownership model
OWNER: full control, unique per object, can transfer ownership. Use groups/service principals in production.MANAGE: can grant/revoke permissions without implicit data access or ownership transfer.- Delegation pattern:
- Metastore admin grants
CREATE CATALOGto catalog owner groups. - Catalog owner groups create catalogs and schemas.
- Catalog/schema owners grant
MANAGEto domain lead groups. - Data stewards get
APPLY TAG; broad users may getBROWSEfor discovery.
- Metastore admin grants
Deliverable: topology decision record showing domain/env/region catalog names, workspace bindings, managed locations, owner groups, MANAGE delegates, and discovery/tagging groups.
Workflow 4 - Storage Governance and External Access
Design where data physically lives and how Unity Catalog mediates access.
Managed storage hierarchy
Unity Catalog resolves managed storage from most specific to least specific:
- Schema managed location
- Catalog managed location
- Metastore default storage
Use schema-level managed locations for regulated data requiring physical isolation. Use catalog-level locations for domain/environment boundaries. Keep metastore default storage as a fallback.
Tables vs volumes
| Need | Use |
| Tabular data queried by SQL/Spark | Delta table (catalog.schema.table) |
| Non-tabular files, PDFs, images, configs, ML artifacts | Unity Catalog volume (/Volumes/catalog/schema/volume/...) |
| Existing cloud files where lifecycle remains outside Databricks | External table or external volume |
| Legacy/external database without immediate copy | Foreign catalog / Lakehouse Federation |
External access chain
For external data, require the full chain:
- Storage credential - cloud identity Unity Catalog can use.
- External location - non-overlapping cloud path bound to the credential.
- External table/volume - governed object using the external location.
Reject overlapping external locations, raw cloud credentials in notebooks, and direct cloud paths where UC volumes/external locations should be used.
Deliverable: storage map showing managed locations, storage credentials, external locations, volumes, foreign catalogs, owners, and allowed write paths.
Workflow 5 - Privileges, Discovery, FGAC, and ABAC
Implement least privilege and scalable fine-grained access.
Privilege chain
To query a table, users need:
USE CATALOGUSE SCHEMASELECTon the table/view
Higher-level grants inherit downward. Grant at the highest safe scope; avoid per-table grants unless the table is exceptional.
Metadata-only privileges
BROWSE: discover objects and metadata without reading data.APPLY TAG: classify assets without data access.MANAGE: delegate permission administration without ownership or implicit data access.
FGAC choices
| Pattern | Use when |
| Row filter | Rows visible depend on user/group/context |
| Column mask | Sensitive columns need redaction/transformation |
| ABAC governed-tag policy | Same row/mask logic applies across many tables/columns |
| Dynamic view | Legacy/special-case logic not expressible as table-attached policy |
Prefer ABAC for enterprise scale: governed tags + inheritable policies beat per-table copy/paste filters and masks.
Validation
Always validate outcomes:
SHOW GRANTS ON CATALOG finance_prod;
SHOW GRANTS `analysts` ON SCHEMA finance_prod.sales;
SHOW POLICIES ON CATALOG finance_prod;
SHOW POLICIES ON SCHEMA finance_prod.sales;
DESCRIBE TABLE EXTENDED finance_prod.sales.transactions;Audit signals:
- grant/revoke actions
- ownership transfers
- policy and tag changes
- token creation
- admin role changes
- denied/failed access attempts
Deliverable: grants/policies matrix plus validation query outputs and system-table audit queries.
Workflow 6 - Lakeflow Spark Declarative Pipelines (formerly DLT)
Lakeflow Spark Declarative Pipelines for declarative, managed, observable pipelines. Existing DLT syntax still works; new Python should prefer from pyspark import pipelines as dp.
When Lakeflow
- Streaming / micro-batch SCD pipelines
- Data quality enforcement (expectations) required
- Lineage and observability wanted out of the box
- Team prefers declarative SQL / Python over hand-orchestrated jobs
When NOT Lakeflow
- One-off batch jobs
- Extensive custom Spark (Lakeflow constrains some APIs)
- Cost sensitivity with low duty cycle (pipeline compute has overhead)
Current Python naming
from pyspark import pipelines as dp
@dp.table
def raw_events():
return spark.readStream.table("prod.raw.events")
@dp.materialized_view
def daily_event_counts():
return spark.read.table("prod.silver.events").groupBy("event_date").count()DLT compatibility mapping:
import dlt->from pyspark import pipelines as dp@dlt.tablefor streaming ->@dp.table@dlt.tablefor batch ->@dp.materialized_view@dlt.view->@dp.temporary_viewdlt.apply_changes(...)->dp.create_auto_cdc_flow(...)
Design
- Ingest to raw (bronze) from cloud storage via Auto Loader or Kafka
- Stage (silver) with schema enforcement, de-dup, CDC via
APPLY CHANGES INTO - Curated (gold) for business aggregates / dimensional model
- Expectations on each layer:
@expect_or_dropfor quality-gate columns@expect_or_failfor must-pass invariants- Track failure counts in DLT event log
- Serverless Lakeflow where available for lower cost and managed sizing
- Continuous vs triggered: continuous for streaming SLAs; triggered for batch windows
- Target target_lag with Dynamic Tables equivalents or DLT settings
- Naming and lineage: three-part UC names end-to-end; tags on every table
Guardrails
- Pipeline in Git; deployed via Declarative Automation Bundles or Terraform
- CI: unit tests for transformations, integration test against a dev catalog
- Alerting: event log -> metrics -> alerts on expectation failures and pipeline failures
- Cost budget per pipeline
Workflow 7 - Cluster Policies
Enforce cost, security, and compatibility at cluster-creation time.
Policies to define
| Policy | Audience | Shape |
interactive-small | Data analysts | Single-node or 1-4 workers; auto-terminate 30-60 min; Standard access mode |
interactive-medium | Data engineers / scientists | 1-8 workers; auto-terminate 60 min; Standard access mode |
job-compute | Jobs / Lakeflow | Fixed instance types; no interactive attach; auto-scale caps |
ml-gpu | Data scientists | GPU-enabled types; restricted to ML group; auto-terminate 30 min |
shared-serverless-sql | SQL users | Serverless SQL Warehouse sizes S/M/L, governed by policy |
Policy content
- Enforced tags:
cost_center,owner,env,pipeline(billable by tag) - Runtime pinning to LTS + latest patch
- Init scripts disallowed or restricted to vetted list
- Access mode = Standard for most UC workloads; Dedicated only by documented exception
- DBFS / mount usage disallowed in UC-only workspaces
- Instance profiles / IAM roles via managed service credentials
Terraform
resource "databricks_cluster_policy" "interactive_small" {
name = "interactive-small"
definition = jsonencode({
"spark_version" = { "type": "fixed", "value": "14.3.x-scala2.12" },
"autotermination_minutes" = { "type": "range", "minValue": 15, "maxValue": 60 },
# Provider-level field/value may vary by Databricks provider version.
# Human-facing policy: Standard access mode for most UC workloads.
"data_security_mode" = { "type": "fixed", "value": "USER_ISOLATION" },
"custom_tags.cost_center" = { "type": "unlimited" },
# ...
})
}Then grant CAN_USE to the right group.
Workflow 8 - Cost and Performance Tuning
Levers (ordered by impact)
- Right compute type:
- Serverless SQL for BI
- Job compute (not all-purpose) for jobs
- Serverless Lakeflow where eligible
- Photon on for Spark SQL / DataFrame workloads - almost always faster and cheaper
- Auto-scaling - set min low; max capped by policy
- Auto-terminate - short for interactive; stricter on policies
- Spot instances - on for job compute where tolerant of evictions; never for latency-critical
- Instance type - memory-optimized for big joins; compute-optimized for ML inference; right-size vs spillage
- Query - partition pruning, Z-order,
OPTIMIZE/VACUUMcadence, broadcast joins, caching - Storage:
- Delta
OPTIMIZEwhen small-file metrics justify it, or use platform-managed optimization where available VACUUMretention tuned to recovery needs- Liquid Clustering where partitioning would fight the query pattern
- Delta
Monitoring
system.billing.usagefor DBU cost by workspace, cluster, job, user, tagsystem.query.historyfor slow queriessystem.compute.*for cluster utilization- Cost dashboard per team / product
Workflow 9 - Governance Audit
Steps
- Catalog inventory: catalogs, schemas, tables, volumes, functions, models, and foreign catalogs. Owner + tags per object.
- Access grants: pull from
information_schema.*and Unity Catalog grants. Flag:- Grants to
account users(broad) ALL PRIVILEGESat catalog / schema level- Non-group grants
- Grants to
- Sensitive data:
- PII tagged and masked
- Row filters configured where applicable
- Tokenization for PCI
- Network:
- Private Link / VPC endpoints
- No public workspace access from the internet (IP ACLs, Private Access)
- Identity:
- SCIM from IdP
- Personal access tokens rotated or replaced with OAuth
- Service principals scoped; not in admin groups
- Secrets:
- Secret scopes used, not hard-coded; scoped to groups
- Cloud-managed secrets (Key Vault / Secrets Manager) via backed scopes
- Audit:
- System tables
system.access.audit,system.access.table_lineage,system.access.column_lineage - Cost and query monitoring from
system.billing.usage,system.query.history, andsystem.compute.* - Streamed to SIEM; retention per policy
- Alerts on privilege changes, admin role grants, token creation
- System tables
Workflow 10 - Export Workspace Assets into Git
Use when notebooks/files/workspace assets exist only in the Databricks workspace and are not yet in a Git folder or repo. Export first, then refactor.
When to use
- A team built notebooks directly in
/Workspace/Users/... - A demo or prototype needs to become maintainable source
- A workspace-only notebook is about to be converted to a job or Lakeflow pipeline
- A review needs a diffable source snapshot before cleanup
Steps
Inventory workspace paths:
databricks workspace list /Workspace/Users/<user> --absolute databricks workspace list /Workspace/Shared/<project> --absoluteExport the workspace directory:
mkdir -p workspace-export databricks workspace export-dir \ /Workspace/Users/<user>/<project> \ ./workspace-export/<project> \ --overwrite- Review exported formats:
- notebooks/files should be source-reviewable (
.py,.scala,.sql,.ipynbdepending on workspace format and export behavior) - remove generated output/noise before committing
- do not export secrets, outputs containing credentials, or ad-hoc data dumps
- notebooks/files should be source-reviewable (
- Commit exported source before refactoring so cleanup has a baseline diff.
- Convert deployable assets to Declarative Automation Bundles or Terraform:
- jobs / tasks / pipelines -> bundle YAML
- workspace permissions / groups / policies -> Terraform or account-level automation
- notebooks -> thin orchestration over versioned Python/SQL libraries
- Lock down workspace edits after migration:
- repo/bundle becomes source of truth
- direct workspace edits are break-glass only
- production runs use deployed jobs/bundles, not ad-hoc notebook state
What workspace export-dir does not capture
databricks workspace export-dir is useful for notebooks and workspace files. It does not fully capture jobs, permissions, clusters, SQL warehouses, secrets, Unity Catalog objects, alerts, dashboards, or pipelines as deployable infrastructure. Move those to Declarative Automation Bundles, Terraform, SQL, or API-managed configuration.
Deliverable: exported source committed to Git, plus a migration plan from workspace-only assets to bundle/Terraform-managed assets.
Workflow 11 - Declarative Automation Bundles CI/CD
Use Declarative Automation Bundles (formerly Databricks Asset Bundles) for deployable Databricks projects.
Minimum CI flow
- Compile / unit test Python, SQL, and Scala code.
- Store versioned artifacts in Unity Catalog volumes or a governed artifact repository.
- Run
databricks bundle validate --target dev. - Deploy to dev / staging with
databricks bundle deploy --target <target>. - Run smoke/integration tests against a dev catalog.
- Promote to production only after approval.
databricks bundle validate --target dev
databricks bundle deploy --target staging
databricks bundle run smoke-tests --target stagingAuthentication for CI uses workload identity / OIDC or service principals. Do not use user PATs.
Workflow 12 - AI / ML / Model Governance
For ML and AI workloads:
- Use MLflow model registry under Unity Catalog where available.
- Use service principals for scheduled training / serving jobs.
- Use Dedicated access mode only when ML runtime, GPUs, R, or unsupported Standard-mode APIs require it.
- Tag models, features, and evaluation tables with owner, sensitivity, environment, and cost center.
- Keep prompt/RAG/vector-search artifacts under governed catalogs, schemas, and volumes.
Workflow 13 - Recovery via Delta Time Travel
Delta tables preserve history; RESTORE brings you back.
-- Inspect
DESCRIBE HISTORY my_table;
-- Query old state
SELECT * FROM my_table VERSION AS OF 42;
SELECT * FROM my_table TIMESTAMP AS OF '2026-04-19T10:00:00';
-- Restore the table
RESTORE TABLE my_table TO VERSION AS OF 42;
-- or
RESTORE TABLE my_table TO TIMESTAMP AS OF '2026-04-19T10:00:00';Guardrails
VACUUMretention dictates how far back you can go - set per-table based on recovery needs- For hard-delete / GDPR: use
VACUUMwith lower retention + explicit delete workflow - Test
RESTOREin dev; have a runbook
Anti-patterns
- Personal access tokens in production code
- All-purpose clusters running scheduled jobs (expensive, contention)
- No cluster policies (users pick 32-worker XL for ad-hoc queries)
- Mount points and DBFS as persistent storage in UC workspaces
USE CATALOG hive_metastorelingering in prod after UC migration- Admin rights granted to groups that include all engineers
- Notebooks as production code paths (without Declarative Automation Bundles or CI)
- No Photon on compute that would benefit
- Auto-terminate disabled "for convenience"
- No cost dashboard; surprise bill each month
- Treating Lakeflow / Declarative Pipelines as "just notebooks" without CI or bundle deployment
- Dedicated compute used as a default instead of a documented exception
- No system tables or audit export in production workspaces
References
- workspace-bootstrap.md - Terraform-driven workspace + UC setup
Related
- Rule: 481-databricks.mdc
- Rule: 480-data-engineering.mdc (cross-platform data contracts, DQ)
- Rule: 475-sql.mdc (safe SQL patterns)
- Rule: 316-zero-trust.mdc (data tier under Zero Trust)
- Skill: data-engineering (pipeline concepts)
- Skill: snowflake (for comparison)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

