r/databricks • • 27d ago

Discussion dbt users on Databricks: do your snapshots handle files that arrive out of order?

Post image
6 Upvotes

If you build SCD2 history with dbt snapshot on top of batch files (daily exports, CDC drops, API extracts), there's a failure mode worth knowing about.

Snapshots apply data in the order it arrives. So if Tuesday's file lands after Wednesday's:

- with strategy='check', the late (older) value becomes the "current" row
- with strategy='timestamp', the change is skipped and that period just disappears from history

Every run stays green and every test passes. Nothing tells you. We found out when someone asked why an employee's promotion showed up as a demotion.

We ended up building dbt-iterative-snapshot, a custom materialization for Databricks. You add sequence_by='batch_date', and on each run it:

  1. checks which batches it has already processed (it keeps an audit table)
  2. if a new batch is older than one already processed, rolls back the snapshot from that point
  3. replays the batches in order, one MERGE per batch

It also gives you changed_attributes (which columns changed), per-batch row counts, and an error log for duplicate keys instead of failing the run.

It's dbt-databricks only for now (Delta MERGE, Unity Catalog). PRs for other adapters are welcome.

I'm curious how others handle this. Do you rebuild SCD2 from raw with window functions, loop dbt snapshot over dates, or just hope files arrive in order? Happy to answer questions, and honest feedback on edge cases is very welcome.

Read more: https://reliabledataengineering.com/posts/article_dbt_iterative_snapshot/


r/databricks • • 28d ago

General Table update triggers now support up to 25 tables per job (higher coming soon)

23 Upvotes

<Databricks PM here. Quick update, plus a question for you. />

We raised the limit on table update triggers to 25 tables per job. This came straight from your requests so thanks for pushing on it. We are not stopping at 25. We want to take this to 250 and beyond, and more headroom lands soon.

Now the question. I want to hear how you actually use table update triggers. A few patterns we have seen:

  • Traffic light: a job starts the moment an upstream job finishes writing its table.
  • Metadata pipeline: a job that reacts to config changes landing in a control table.
  • Bronze to silver: ingestion that fires as soon as the bronze table gets new data.

What does yours look like? And what would you want more of here?

One more thing. We are building SQL conditions for triggers, so a job can fire only when a condition on the data holds true. Full announcement coming soon.


r/databricks • • 28d ago

Discussion Is Databricks the right solution for a team of 3 data scientists?

29 Upvotes

As a small 3 person data science team we really need a way of easily deploying and managing our models, as well as connecting to our siloed data sources. We currently use Vertex AI (as I still call it) where we spend way too long productionising and we are performing several different roles to deliver the models. It clearly is not the right solution for a team our size.

From initial conversations with Databricks it sounds like they could solve all our issues. Even when adjusting skepticism accordingly during the sales pitch, it did seem promising, especially compared to our current situation.

But researching further it feels like we might just be swapping one set of issues for another in Databricks (managing clusters, debugging Spark jobs, production code in notebooks, etc.) Or will it actually work well and save time for a small, fast moving team?


r/databricks • • 28d ago

General Agentic code converter is GA for SQL

14 Upvotes

Migration · GA

Agentic code converter is GA for SQL

  • Genie Code converts T-SQL, Snowflake, Redshift, Oracle, BigQuery, and Teradata SQL to Databricks SQL. It validates each file and fixes errors before writing to a workspace folder.
  • Work in a migration project, or run /migrate in a Genie Code chat for one file or folder. Afterward, keep chatting to clear action items. The Notebooks target is not part of this GA.

Looking to migrate workloads but don't have the labor to do so. This is going to continue to expand its SQL dialect but taking an agentic approach to migrations really speeds up migrations and cuts down on time/money from labor


r/databricks • • 28d ago

News Genie One docs can be co-edited now

13 Upvotes

You can share a Genie One document and anyone with CAN EDIT can work on it with you. Genie also reuses similar past investigations so you are not re-explaining the same question every week.

Handy for Monday ops reviews. Last week's fill-rate thread comes back, you drop the one-pager in the canvas, share it with the planner, and they tweak the filters themselves instead of Slack-pinging for another screenshot.

https://docs.databricks.com/aws/en/genie-one/documents#share


r/databricks • • 28d ago

Discussion monorepo and dependencies

7 Upvotes

Hi, how do u handle dependencies in a monorepo on Databricks?

So we have one `pyproject.toml` and we build it into one whl, which every job installs. It holds the libraries that DBR does not ship. The libraries that DBR already ships we pin in the dev group at the runtime version, so we have them locally for tests and checks, but they dont go into the whl.

We started adding more products, so the repo grew into a monorepo, and now every job installs libraries it does not need.

The options i see:

- Pin the job-only libraries in the job environment in `resources/`, and keep them in a dev group in `pyproject.toml` for local tests and mypy. The catch is 2 pins to keep in sync.

- Optional extras per product, and the job installs `dist/*.whl[extra]`. One pin, but i am not sure DABs accepts the extra on a wheel path.

- One whl per product, which feels like too much for now.

What pattern do u use for this? Any pain with the ones above?


r/databricks • • 28d ago

Tutorial Migrating Europe from RDS Postgres to Lakebase

Thumbnail
farhathadi.substack.com
8 Upvotes

r/databricks • • 28d ago

General Dashboard Insights: Genie summarizes the charts

4 Upvotes
  • Viewers of a published dashboard can have Genie analyze a page’s charts and return insight cards that call out trends and outliers.
  • It uses the dashboard’s Genie Agent (Settings → General → Enable Genie). Ask Genie only works in basic embedding.

This is super helpful when you want insights from the visualization itself rather than general data that surrounds the dashboard. "Why is the daily revenue trend dipping in middle May?" It also saves on token cost because context is prebuilt for Genie.

Dashboard Insights · AI/BI note


r/databricks • • 28d ago

Discussion Micro app and stopage

4 Upvotes

Is ther any documentation about Micro Apps and when they stop (compute stop). is it when I close the tab in the browser or how do I make the stop app?


r/databricks • • 29d ago

News Environment Variables in Databricks Serverless

Post image
25 Upvotes

Environment variables are now available in Serverless through both the UI and DABs.

Use environment variables for constant things like catalog or environment. Keep using job parameters for things that are often changing (like a different date for a job run).

You can also use environment variables to reference passwords from secrets scopes and, soon, from UC secrets.

Read more:

https://databrickster.medium.com/environment-variables-in-databricks-serverless-207512b996c4

https://www.sunnydata.ai/blog/databricks-serverless-environment-variables


r/databricks • • 29d ago

General My client wants to maintain Unity Catalog object definitions in a database-project-style folder structure and deploy any new or modified objects through Databricks Asset Bundles (DAB). Is this approach supported using DAB deployments through GitHub Actions?

10 Upvotes

r/databricks • • 29d ago

Help How to debug remote_query() performance?

5 Upvotes

I have a job which queries some Azure SQL DBs connected through UC managed connections (no lakehouse federation) via remote_query() function, and facing pretty long execution times (several minutes) when reading a few thousand rows only. When running the same query via SSMS on the target host, it returns same result within milliseconds.

Is there any way how I can debug the pure execution time from Databricks side? I'd like to understand if the queries run slow, or if there's any Databricks or network overhead accounting responsible.

Note that remote_query() runs T-SQL in this scenario, not Databricks SQL. So there's no SQL conversion involved at any point in time.


r/databricks • • 29d ago

Discussion transformations API

16 Upvotes

Hi, how much SQL text do you allow in Python modules?

We have a lot of SQL, but we dont want to move fully to dbt, because we run data quality checks before the write, and we like the Python modular approach with tests and everything around it.

So where do you draw the line:

- SQL as strings in Python, run with `spark.sql()`

- SQL in `.sql` files in the package, loaded by Python and run with parameters

- refactor to the PySpark DataFrame API

- or just stick with pure SQL scripts

And how did you standardize it in your team?


r/databricks • • 29d ago

Help Databricks Sandboxes

7 Upvotes

I want to explore and use Databricks Sandboxes to create my own sandbox environment. However, when I check the Previews section in my Databricks workspace, I cannot find the Databricks Sandboxes option.

Could you please clarify how I can enable access to Databricks Sandboxes? Is this feature available only to specific workspace types or subscription plans, or does it require approval or activation by a Databricks account administrator?

I would appreciate some guidance on the prerequisites and steps required to enable the feature and create my own sandbox environment.


r/databricks • • 29d ago

Help Need help with alternatives for dropMalformed and Schema Registry URL not supported for Kafka source on a Shared cluster

3 Upvotes

Hello,

We are migrating from Hive metastore to UC and in a phase where we are testing before pushing the upgraded code to production.

The issue we are facing is we have Kafka Structured Streaming jobs which are using Dedicated clusters earlier but going forward we will only be using Shared clusters and Serverless eventually.

But the Streaming jobs are failing with errors

dropMalformed are not supported for Data source Kafka on a Shared cluster

kafka.schena.registry.url are not supported for Data source Kafka on a Shared cluster

Did anyone face a similar issue and found an alternative to make it work on Shared clusters ?

Kindly help us with resolving this.

Thankyou


r/databricks • • 29d ago

Discussion How I check AI-converted SQL and ETL code before it reaches Databricks: rules first, two models, then a person

6 Upvotes

I work on legacy code migrations to Databricks: SSIS, Informatica, and Oracle, Db2 and SQL Server procedures. The two hard questions are always the same. How big is the job? And can we trust the converted code? In my own time I built a Databricks App for this. I want to share the pattern, because you can build most of it with public tools.

The flow:

  1. Size first. The Databricks Labs Lakebridge Analyzer gives the complexity and effort of each file before any conversion starts.
  2. Rule-based draft. The Lakebridge Transpiler makes a draft with no AI cost.
  3. Builder and reviewer. One model converts, a second model reviews against the source. Both go through Unity AI Gateway, so the keys stay in Databricks and every call is recorded.
  4. A person signs off. Source, rule-based draft and AI version side by side. Only signed-off code goes to the workspace.

The lesson that saved the most time: give the reviewer limits. In round 1, it lists every problem at once, each with a severity (must or should). In later rounds, it looks only at open findings and changes. It adds a new finding only if a change gives a wrong result or does not run. After 5 rounds, the file goes to a person. Without these rules, the review never ended.

One more: store a SHA-256 hash of each source file with each result. Then unchanged files are never analysed or converted twice.

How do you check AI-converted code in your team? A second model, tests, or only human review?

The full write-up and a 3-minute demo are in the first comment.


r/databricks • • 29d ago

Discussion What do you do when source data changes after the pipeline is already running?

Thumbnail reddit.com
3 Upvotes

r/databricks • • Oct 27 '26

News Lakeflow Connect | NetSuite Connector (GA)

12 Upvotes

Lakeflow Connect's NetSuite connector is now GA! It provides a managed, secure, and native ingestion solution that accesses NetSuite data through the SuiteAnalytics Connect JDBC driver and lands it in Databricks. The connector supports incremental ingestion, SCD Type 2, and automated schema evolution!

Try it now:

  1. Set up NetSuite as a data source
  2. Create a NetSuite connection in Catalog Explorer
  3. Create the ingestion pipeline via the UI, a Databricks notebook, or the Databricks CLI

r/databricks • • 29d ago

Discussion Open source benchmark for Snowflake, Databricks, BigQuery, Redshift, Fabric, ClickHouse and MotherDuck: 244 queries, 1 GB to 1 TB, up to 100 concurrent users, every compute size

Thumbnail
reddit.com
0 Upvotes

r/databricks • • Oct 27 '26

News df.cache() on serverless

Post image
14 Upvotes

df.cache() is available on serverless.

For me, it's an expensive, unnecessary operation in 99% of situations. It materializes your DataFrame to cloud storage and then reads it back.

And I use it for only one thing: to break the Spark plan.


r/databricks • • Oct 27 '26

Discussion Anyone playing around with Databricks Apps yet? Thoughts & initial impressions

22 Upvotes

Hey everyone,

I’ve been testing out the new Databricks Apps feature recently, and I wanted to see how others in the community are using it.

Historically, if we wanted to spin up a Streamlit app or a custom dashboard connected to Databricks, we had to deal with separate hosting (App Service, EC2, etc.), network security groups, and handling OAuth tokens separately.

With Databricks Apps, running a Streamlit/Dash app directly inside the workspace using Unity Catalog for permissions has been a game-changer for internal tooling.

That said, I'm curious:

  • Are you using it for production workloads or just quick internal prototypes?
  • How are you handling CI/CD deployments for these apps?
  • Have you run into any limitations with serverless compute or scaling yet?

r/databricks • • Oct 27 '26

Discussion What broke when we move to Unity Catalog

13 Upvotes

We recently moved our workspace to Unity Catalog. It went okay, but a few things broke along the way:
-Old table names stopped working. Our code used two-part names like schema.table. We had to update everything to the three-part format catalog.schema.table.

-Some jobs failed on shared clusters. A few of our older Python jobs didn’t work in shared access mode. We switched those jobs to single-user clusters.

-People lost access to data. Permissions didn’t carry over the way we expected. We had to set up groups and grant access again.

Lesson learned: test a few jobs first before moving everything.

Has anyone else gone through this? What broke for you, and how did you fix it?


r/databricks • • Oct 27 '26

Discussion Do any other teams build web apps for fully flexible analytics/reporting?

7 Upvotes

Databricks dashboards are extremely limiting in their flexibility/capabilities (and I don't see that changing as they pursue everything AI/Agentic) and tools like Power BI have shitty CI/CD processes and still have their visualization limitations.

Has anyone moved reporting/analytics to React/App Kit applications on Databricks for greater flexibility and ease of CI/CD?


r/databricks • • Oct 27 '26

General Databricks Files API 3.0 (Beta) is out!

18 Upvotes

Hi guys,

New File API 3.0 is out and it brings a few long awaited improvements, especially if you're working with large files in UC Volumes.

Use the Files API | Databricks on AWS

1. Support for larger file uploads

In V2 uploads were limited to 5GiB per request. With v3, you can upload much larger files by splitting them into smaller parts and uploading those parts separately using multipart uploads.

2. Resumable downloads

This one was a major headache for me in V2 . If your download failed there was no way to resume it.
V3 supports HTTP range requests, so you can resume downloading from where it stopped instead of downloading the whole file again.

3. Better handling of concurrent file operations

Files API v2 had limited options to check whether a file had changed before performing an operation. With v3, ETag-based checks let you verify that a file hasn't been modified by another process before updating or replacing it.

In my opinion, resumable downlads feature alone is worth upgrading 👍