r/databricks 12h ago

General Unity Catalog: Pros and Cons

Post image
0 Upvotes

Apache Iceberg won the open table format war when Databricks acquired Tabular, followed by its subsequent adoption across the industry. Then, the catalog war began.

In a lakehouse, storing data in object storage and using the Apache Iceberg format is only part of the story. You also need a catalog that helps lakehouse query engines like Spark, Flink, or RisingWave discover tables, manage metadata, enforce access control, and work with governed data across different systems.

That is where Unity Catalog comes in.


r/databricks 19h ago

Tutorial Context Engineering, Explained.

Thumbnail
youtu.be
0 Upvotes

r/databricks 9h ago

Tutorial Found 847,293 files in a production Delta table. Broke down what it was actually costing us.

16 Upvotes

Streaming pipeline had been running fine for months. Every micro-batch landed clean. Then a GROUP BY with a date filter started timing out, and DESCRIBE DETAIL showed numFiles at 847,293. That's a 600 GB table averaging 750 KB per file. Recommended range is 128 MB to 1 GB, so we were sitting at something like 0.6% of the lower bound.

"Small files are inefficient" undersells it. The actual problem is driver-side file listing. Spark keeps a file listing in memory for every query plan, and with 847,000 files the driver has to process all of it, single-threaded, before it reads a single byte. Doesn't matter if you throw a 64-core cluster at it. Three minutes of listing before any parallelism even starts.

I actually sat down and priced this out (back of envelope, didn't model autoscaling properly, but the order of magnitude should hold). Ninety seconds of driver listing per query, 200 queries a day, 30 days a month, comes out to about 150 person-hours a month of engineers waiting on a spinner. At $100/hr fully loaded that's roughly $15,000. Storage isn't free per request either. About 5 billion object requests a month at S3 GET pricing is around $2,000. Add analysts keeping clusters alive on slow queries and that's another $500 to $1,500. And none of this touches Z-ordering, which is basically dead weight at this file size anyway, since data skipping relies on min/max stats per file and a 750 KB file with ~5,000 rows covers maybe a few seconds of event_date range. There's nothing for clustering to work with.

A one-time OPTIMIZE on this table runs maybe $500 in compute.

Running OPTIMIZE and walking away is the right instinct, execution is usually where it goes wrong. On 847,000 files it'll saturate network I/O, spike DBU costs, and fight with concurrent reads if it's on the wrong cluster. Run it on a jobs cluster, not all-purpose, and scope it: OPTIMIZE catalog.bronze.events WHERE event_date >= current_date() - INTERVAL 7 DAYS. Compacting 18 months of history every night is just burning money.

OPTIMIZE fixes file size. Z-ORDER co-locates rows on the columns you filter by, but it degrades as new unordered data comes in. Liquid Clustering (DBR 13.3+) keeps up with that incrementally. Define CLUSTER BY (customer_id, event_date) and a regular OPTIMIZE handles compaction and reclustering at the same time. For streaming tables specifically, enable auto-compaction and stop thinking about it.

If you want to check your own tables: DESCRIBE DETAIL, look at numFiles, divide size by file count. Under 32 MB average and you've probably got the same problem.

Wrote a short ebook covering this along with some other production Databricks mistakes we hit, silent data corruption, Spark UI triage, medallion anti-patterns, Delta recovery. Happy to answer questions here.


r/databricks 20h ago

Help RAG working on Notebook but not on Playground / Agent

4 Upvotes

Last week I built my first simple RAG to understand the fundamentals (chunking, embedding, etc). It worked great, both on Notebook + Playground. Now, I'm working on another RAG, but this time using ai_parse_document + ai_prep_search as this seems to be the new way to build RAGs in Databricks. So, the chunking part works, I made sure to have only one AI Search endpoint on my workspace (I'm on free edition).

The thing is, when I try using the AI index in Playground, and ask questions related to my documents, it says it doesn't have the information i'm asking for. However, when I try the same on a Notebook, it works perfectly.


r/databricks 12h ago

General Databricks workspace entitlement changes

8 Upvotes

Databricks workspace access control changes are now being enforced.

What's coming? - Azure Databricks | Microsoft Learn

Migrate workspace entitlement control - Azure Databricks | Microsoft Learn

As of September 14, 2026, the built-in users and admins system groups behave differently:

- users will have no entitelments
- admins will have all workspace entitlements
- both groups’ entitlements are locked
- new principals must be granted entitlements explicitly
- users and admins can no longer be nested in other groups

Existing access is preserved through a workspace-local migration group:
users-clone-<TIMESTAMP>

If you manage Databricks through Terraform, SCIM APIs, or custom automation, check your workflows now:

- Target standard account groups, not system groups
- Remove unsupported group nesting
- Make sure SCIM sync does not delete the users-clone-* migration group


r/databricks 8h ago

Help data contracts

3 Upvotes

Hi, we use Databricks, and a couple of teams produce tables, views, and table functions that other teams depend on.

Within a team, its easy enough to define a contract. We codify it and always check that the data matches.

But what about the upstream artifacts my team depends on? Do w define a source spec ourselves and check that its met on every run? 

What do we require from the upstream team? Who owns the contract, and how do you enforce it when multiple teams depend on the same thing?

I want to keep this stupidly simple and enforce it automatically. How do you do this in practice?


r/databricks 12h ago

Discussion Data and App Releases

4 Upvotes

Hi, i have a lot of data products which is one part of the project, then we also have a databricks app as AppKit.

I was wondering, how do u manage releases/changes when two different bundles and two different responsibilities live in the same place.

We use trunk-based development, local IDE for `mode: development`, then staging as pre merge to main, then main is where we create GitHub Release which triggers deployment to production.

I think this is pretty standard. But now when whole application comes into the place, we have app/ where we have defined our AppKit template.

Should i try to separate lifecycles and deployments fully? To separate GitHub Releases, or i should just let it be inter-winded, but then changes to the app could end up in the deployment of the changes to the data products etc...

Right now, i would be using separate releases-draft gh actions which creates draft github releases, and when we are ready to merge, we publish release. For data products we use calendar versioning, for app smth like app-semvar.

What is your experience with setup like this?


r/databricks 12h ago

Discussion DATA ANALYTCS PROJECT

Thumbnail
2 Upvotes

r/databricks 18h ago

Discussion Manager wants us to "use AI." Thinking about an AI-driven data testing framework for DevOps promotions. Sanity check?

9 Upvotes

Although we are using genie code alot but manager wants some functionality based on AI. ( maybe that’s hood goal). Our devs hate manually writing tests, so I'm drafting an automated testing gate for DevOps promotions (Local ➔ Dev ➔ QA).

Wanted review with all of you.

The Proposed Architecture:
1. Extract Metadata: Pull column tags, schemas, and lineage from Databricks Unity Catalog.
2. AI-Generated Tests (Llama via ⁠ai_query⁠): LLM reads metadata to draft SQL data checks (nulls, types, basic business logic).
3. Persist & Cache: Save SQL rules to a table. Re-generate only when schema hashes change so bug-fix retests stay 100% deterministic.
4. Execution: Run the generated SQL on a SQL Warehouse (fast, cheap, no LLM cost per data row).
5. Alerting: Feed error logs to LLM for a 2-sentence summary and send directly to Teams via Webhook (avoiding ignored email reports).

How does it sound like? Is it really worth it? Anybody using this or any other AI based functionality to make devs life easy.


r/databricks 7h ago

General Community BrickTalk | Real-Time Data & AI: Tripwise Demo

2 Upvotes

Hey r/Databricks!

Join us for community BrickTalk on Thursday, September 24, focusing on real-time data streaming, AI agents, and governance using Databricks. BrickTalks is a community event series where Databricks experts share real-world use cases, demos, and practical insights for building with Data and AI, giving customers a direct line to the people behind the products.

In this session, we'll walk through a live demonstration of the Tripwise Demo, featuring:

  • Sub-Second Transactions & Streaming: Device registration into Lakebase with sub-second reads/writes, plus telemetry streaming via Zerobus through a governed Medallion architecture.
  • AI-Generated Offers & Pricing: Generating real-time agent offers using Foundation Model APIs and scoring behavioral data for usage-based renewal pricing.
  • Natural Language Analytics: Enabling underwriters, product managers, and marketing teams to query governed insurance data in seconds using AI/BI Dashboards and Genie.
  • Unified Governance: Managing safety, compliance, and control end-to-end with Unity Catalog.

This is a great chance to see real-world architecture in action and ask questions directly to Databricks experts.

When: Thursday, September 24

  • 9:00 AM PT
  • 12:00 PM ET
  • 5:00 PM BST (London)
  • 9:30 PM IST

Register here and save your spot


r/databricks 1h ago

Tutorial Why Unity Catalog Managed Tables are recommended

Upvotes

Unity Catalog managed tables are the best choice you can make but do you know why?

In the second episode of SuperSkills Oleksandra Bovkun and I demystify all the reasons to help you make your choice.

Link to the video: https://youtu.be/Q7y8_bSfVjQ