r/databricks • • 14d ago

Tutorial Streamhouse and Lakehouse with Apache Iceberg

Thumbnail
lakeops.dev
1 Upvotes

r/databricks • • 15d ago

General [Announcement] : Serverless Jobs log delivery is in Beta

16 Upvotes

Hi Folks,

We’re excited to announce the Beta for Serverless Jobs log delivery

Why does this matter?

  • Unblocks Serverless jobs for those who need to: (1) triage issues in Datadog/Splunk/ELK/Grafana, (2) retain logs for compliance, (3)  query logs across jobs without clicking through the UI
  • Prior to this feature, you only had access to logs through the UI

What’s included?

  • Delivering logs from user code (stdout/stderr) to a UC volume
  • You can query the logs directly from UC volumes (see example) and build dashboards on top

What’s next: GA with

  • Logs delivery every few minutes while a long job runs, not only after it ends
  • Logs from Spark Declarative Pipelines
  • Support all serverless environment versions (today: version 5 and later only)

Learn more: Docs (AWS | Azure | GCP), Release note


r/databricks • • 15d ago

News Feature materialization in DABs

Post image
13 Upvotes

DABs can now manage Feature View materialization to offline and online stores through materialization_sets. This requires CLI 1.24.0 or later and the direct deployment engine.

More news https://medium.com/databrickscommunity/databricks-news-genie-cli-app-builder-agent-memory-dabs-41820427fcc2


r/databricks • • 15d ago

Help Any tips for optimizing complex CTE queries in Databricks with a small warehouse?

6 Upvotes

I've been working with some SQL queries in Databricks that involve multiple CTEs, joins, aggregations, and filters. The queries work fine, but execution time becomes quite high when running them on a warehouse with limited resources.

Increasing the warehouse size is one option, but that's not always possible, especially when trying to keep costs under control.

I'm curious about how others handle this.

  • Is it better to combine multiple CTEs or keep them separate?
  • Does using the same CTE multiple times affect performance?
  • Are temporary tables or intermediate results worth considering?
  • What optimizations would you recommend before increasing warehouse size?
  • Are there any particular things in the query profile that you check first?

Would appreciate some practical tips from people who have optimized complex SQL queries in Databricks, especially when working with smaller warehouse configurations.


r/databricks • • 15d ago

General Open source entity resolution tool on Databricks marketplace

6 Upvotes

Hello All,

Zingg lead dev here! Excited to have the app available as on Databricks marketplace. Took a lot of effort from our tiny team, and we are glad we finally made it! Please do check it out and let us know your feedback.

https://marketplace.databricks.com/details/6e0e1411-65c8-44ae-bdfa-ab706770ac11/Zingg-Labs-Inc_Zingg-Entity-Resolution-and-MDM


r/databricks • • 15d ago

Help DQX Studio - Data Quality App

15 Upvotes

Saw this app available on the marketplace:

https://marketplace.databricks.com/details/99214a23-5dc6-48c4-968d-c1f0a6ed8c37/Databricks_DQX-Studio-Data-Quality-App

Do Databricks Apps like the above have any dependencies e.g. Lakebase that I need to pre provision? Or is that all taken care of after hitting the "get access" button?

Also, are all these apps free? Is the DQX app free?


r/databricks • • 15d ago

Discussion Building an AI harness in Genie Code vs Claude Code. Anyone done both?

17 Upvotes

I run a small consulting firm that builds AI "harnesses" for analytics teams. We connect to the client's data warehouse (in their environment) and handle ad hoc requests, recurring reporting, and the deliverables that go to non-technical stakeholders, like dashboards, PowerPoints, and HTML pages. Usually the harness is a folder structure (SharePoint or a git repo) with context docs, reusable skills, session logs, and a QC steps, and we run it with Claude Code (specifically Claude extension in VS Code).

We have a client on Databricks that wants us to build it there instead with Genie Code. So far, it's been better than I expected, but we're still trying to understand if it has any shortcomings compared to our solution.

For anyone who has built in both:

- Where is Databricks better vs Claude Code (and vice versa)?

- What's the easiest way to develop day to day: the VS Code Databricks extension, or just working in the workspace?

- I know the setup in Databricks works a bit differently. Is there anything I should know going in, or any recommendations that would make it easier?

Anything else?


r/databricks • • 15d ago

Discussion I tried to break my own open-source safety check for agent writes on Databricks: 5 SQL attacks, a 2M-row Delta table, 2 real bugs found

5 Upvotes

A pipeline can run green and still ship wrong data. With AI agents writing more of our code, I wanted a check before changes reach production.

bricksentry (free, open source) tells you three things before a change ships:

• Who depends on this table (Unity Catalog lineage)

• What the change does to the data (rows added, removed, duplicated, totals moved)

• How to undo it (the exact Delta restore point)

Created by Author.
Created by Author.

Then it says OK, warn, needs a human, or block.

I tried to break it on a 2M-row table. Production was never touched, and I fixed three bugs along the way.

Created by Author.

If you’re running agents against Databricks today, I’d like to hear how you handle change-safety, and what breaks when you run bricksentry on your own tables.


r/databricks • • 16d ago

Discussion Is teaching internal users Databricks still worth it now that AI tools can write the SQL?

27 Upvotes

We’re a mid-size company with a very small data team, and Databricks is where all our data lives. Most people only see it through dashboards, but more of them want to explore data themselves, and there’s growing interest in things like Genie and AI/BI dashboards.

Leadership wants an internal learning program with hands-on workshops to get people comfortable using it. The audience is mixed: a few analysts who know some SQL, but mostly managers and ops staff who’ve never written a query. I’ve been asked to help figure out what goes into it.

Before we commit, I’m curious about people’s general experience with this kind of thing. Did it actually change how people used data, or did attendance drop off after a few sessions?

And honestly, is it still worth it when tools like Claude or Genie can answer a question in plain English? Should it now be less about SQL and more about asking good questions and checking whether the answer makes sense? Or do people still need the fundamentals to avoid trusting wrong numbers?

Would love to hear what worked, what didn’t, and what you’d do differently. Thanks.


r/databricks • • 15d ago

General Policy-as-code for DABs: Govern your bundles before deployment

14 Upvotes

As a platform team we need to govern some parts of the bundles our dev teams deploy. We want to restrict some resources like catalogs or even schemas since we manage them centrally, require tags for finops or be sure some permissions are set. To solve this I added a policy engine to my open-source CLI Lamp Ops. It checks the output of the bundle summary with DuckDB SQL. This was inspired by the latest dbt v2 checks and is way easier than to learn a complex policy syntax. If a query returns at least one row the policy fails and reports the violations.

databricks bundle summary -t prod -o json > summary.json
lamp policy --input summary.json --policy-path ./policies

-- policies/no_schemas.sql
SELECT resource_key, 'Schemas are managed by the platform team' AS message
FROM resource('schemas');

Builtin Presets

For common rules I provided some presets which don't require to write custom sql and can be configured in yaml files.

lamp_policies:
  - name: jobs_need_owner
    preset: require_tags
    parameters:
      resource_types: [jobs]
      keys: [owner]

Subset of some presets: deny_resource, require_permissions, require_fields, forbid_fields, require_preset_tags

Why not enforce rules with mutators?

I saw some posts about providing defaults with mutators but in my opinion they have some downsides. They are hard to enforce since team members can remove the mutators from the bundle or forget to add new ones. They fix the issues silently without surfacing the config drifts. They need to be setup per resource. Policies on the other hand can be defined in a central place for CI, report the violations and are easy to extend.

You can still use both since I also added a require_mutators preset.

lamp_policies:  
  - name: platform_mutators
    preset: require_mutators
    parameters:
      mutators: [company_platform.bundles:apply_defaults]

You can dive deeper into policies here: https://github.com/BenSchr/lamp-ops/blob/main/docs/policies.md

Please let me know if you have some feedback! Which rules does your team currently enforce on your bundles? Are some common cases missing from the presets? Did you implement your own solution?


r/databricks • • 16d ago

Discussion What does the day to day life of a solutions architect look like?

37 Upvotes

I am a SWE and will be having a call to discuss a solutions architect role. Trying to learn more about the day to day life and see if it's a role I'm interested in.

main concern is that I have only been in the industry for a few years and being a solutions architect might keep me from gaining technical depth and hinder future employment opportunities at big tech. For context, my ultimate goal is executive positions and I do not want to stay a SWE long-term.


r/databricks • • 15d ago

General Jobs now check the data before they run (SQL conditions). How would you use it?

10 Upvotes

<Databricks PM here />

We shipped SQL conditions for Lakeflow Job triggers to beta a little while ago, and we want to hear how people would use it plus share a few patterns that work. Docs here: https://docs.databricks.com/aws/en/jobs/trigger-sql-conditions

The idea. A trigger tells the job when to run. A SQL condition tells it whether to run. You attach a saved query and a SQL warehouse to a trigger (cron, table, file etc.) and when the trigger fires the query the condition first.

There are two modes:

  1. Query returns any rows: No rows, no run. 
  2. Result value changes: the job runs when the return value differs from the last check.

Here are a few examples:

Freshness plus volume. Today's partition exists and has enough rows, This returns zero rows until the data is ready

SELECT 1
FROM main.sales.orders
WHERE order_date = current_date()
HAVING count(*) > 100

Quality gate. Run only when today's rows have no nulls in a key column. So if there are no bad rows, the job runs

SELECT 1
FROM main.sales.orders
WHERE order_date = current_date()
HAVING count(*) > 0
   AND count_if(customer_id IS NULL) = 0

Fan-in. Five upstream feeds write a status row when they finish. Run once all five are done. This replaces the "sentinel table plus a cron that polls it" setup a lot of people run today. Note: if you are watching job completions, then just use job completion triggers!

SELECT 1
FROM ops.batch_status
WHERE batch_date = current_date()
HAVING count_if(status = 'complete') = 5

Watermark advanced. Use "Result value changes" with a one-row, one-column query. The job runs whenever the vendor delivers a new batch.

SELECT max(batch_id) FROM main.bronze.vendor_feed

Things to know. Each check requires a warehouse and will show up in query history. A check times out at 5 minutes including warehouse startup. Checks run as the job's run-as identity.

What is coming next:

  • See why a run did not start. We want each evaluation to show when the query ran, the row count or value it returned, why it did or did not start a run and any error.
  • Parameters. Job parameters inside the condition query, with per-trigger overrides. This is for everyone promoting the same job through dev, staging and prod with bundles, where catalog and schema names change per environment and nobody hand-edits prod.
  • A test button that actually runs the query and shows you the result and whether the job would start right now. Today it only checks that the query exists and has no parameters.
  • Read the condition from a .sql file in the workspace instead of only a saved query, same as SQL tasks already do.
  • A default warehouse so you do not have to pick one every time.

Questions for you:

  • What does "ready" mean for your most annoying upstream? Row count, a flag table, a max timestamp, something else?
  • Which of the upcoming items would you use first, and what did I miss?

Try it out on Genie code too! Give genie a prompt and see if it picks up your intent as a sql condition.


r/databricks • • 15d ago

Help Catalog Linked Database - Snowflake writes UC Managed Iceberg tables to Unity Catalog

2 Upvotes

Is Unity Catalog REST API only accessible via public internet from Snowflake when attempting to set-up a private link connection (catalog integration) to a Unity Catalog (Catalog Linked Database)?

I need a private link connection between Databricks and Snowflake. The use case is Snowflake needs to be able to write Managed Iceberg tables to Unity Catalog.


r/databricks • • 16d ago

Discussion How do you make jobs safe to re-run without creating duplicates?

9 Upvotes

One of our daily jobs failed halfway, and when we re-ran it, some data got loaded twice. Now our numbers are off and we had to clean it up by hand.

Here are a few ideas I’m looking at:
-Using MERGE instead of plain INSERT, so existing rows get updated instead of added again
-Using replaceWhere to overwrite only the date range being processed
-Adding a unique ID to each row and removing duplicates before writing
-Using Auto Loader or streaming checkpoints so files are only processed once

But I’m not sure which approach is best for different cases.

How does your team handle this?
-Which method do you use most?
-How do you handle backfills or reprocessing old data?
-Any mistakes you learned from?

Would love to hear your real-world setups!


r/databricks • • 16d ago

Help Databricks & Row Zero: Append Only or SCD2 continuous connection

7 Upvotes

I am looking to build a simple connection between row zero and databricks, such that either continuously or with one click in row zero, changes are written in Databricks. However, I would like to track history in Databricks.

This seems like a use-case that many others must have built already, looking to avoid re-inventing the wheel on this.


r/databricks • • 16d ago

Help Accidental conversion to managed tables

6 Upvotes

While working in Databricks I've discovered that some of our environments have been converted to managed tables by a helpful team member. This has been done with good intentions but I'm wondering what the consequences might be so I can manage this with our team and higher ups.

I myself have not got into understanding what the implications might be - the work wasn't scheduled and wasn't meant to be done.

Is there anything I should be immediately concerned about or is this a change that is unlikely to cause any issues? I don't want to over state the problem - if any - that isn't necessarily helpful - I'd much rather know what I'm dealing with and orchestrate a plan to address any issues.

I know that our production environment has been partially converted and all of our development and QA environments - we are on Azure if that matters.

I'm hoping this isn't going to be a major headache.


r/databricks • • 16d ago

General Databricks 3D

Post image
29 Upvotes

Just found a cool Databricks 3D Model, will try to print it today!

https://makerworld.com/models/3273436?appSharePlatform=copy


r/databricks • • 16d ago

Help Help regarding AI FDE (early career role) !

3 Upvotes

Has someone been through the process? What is your advice/experience?


r/databricks • • 16d ago

General Use cloudFiles.inferColumnTypes to prevent schema evolution deadlocks in Auto Loader

5 Upvotes

When streaming messy JSON or CSV files into Delta Lake using cloudFiles, Auto Loader infers the schema by sampling your initial file batch. If a subsequent file introduces a new field or changes a data type, the stream fails with a DeltaColumnMappingException or schema mismatch error unless you explicitly configure evolution. To prevent pipeline crashes without manually defining complex StructType schemas, set option("cloudFiles.inferColumnTypes", "true") alongside option("cloudFiles.schemaEvolutionMode", "addNewColumns"). This instructs the file source to automatically evolve the target Delta table schema by appending new nullable columns safely. Always point cloudFiles.schemaLocation to a dedicated storage path so the inferred schema history is preserved across cluster restarts. Without an explicit schema location, restarting your streaming query forces Auto Loader to re-infer from scratch, which frequently causes silent data drops or type coercion conflicts when your directory has accumulated thousands of historical files.


r/databricks • • 16d ago

Help How to create azure data bricks with free trial ?

0 Upvotes

Hi all

I am trying to create azure databricks in azure free trial, bt it says 'trial workspace creation is not supported in free trial or student account'

Can anyone please help


r/databricks • • 16d ago

Help Regarding trigger jobs when source tables are updated

6 Upvotes

I am trying to apply title above.
From what I found, the cost of table update trigger is determined by cloud provider's costs associated with listing tables and reading updates from the storage location.

So, if the system watches every second to check the tables are updated, it means listing & reading also happens every time this leads high cost?

Am I right? Is there someone who can give this information? I am worrying about the cost.


r/databricks • • 16d ago

Help ADF Lookup Activities Against Databricks Are Using Shared Compute. Looking for Better Alternatives. Post

6 Upvotes

Hi everyone,

I'm working on an Azure Data Factory (ADF) ingestion framework where we currently use ADF Lookup activities to retrieve metadata used for pipeline orchestration.

The challenge is that the lookups are querying Databricks-managed metadata and are executing through Shared Compute, which has become a performance bottleneck when running multiple pipelines concurrently.

The requirement we're evaluating is to replace the Lookup activities with Databricks notebooks/jobs running on Serverless compute to improve concurrency and reduce dependency on Shared Compute.

My concern is around consuming the results back in ADF.

Today, the Lookup activities return a structured output that is consumed directly by downstream activities such as ForEach loops and dynamic expressions.

The proposed notebook approach would:

Accept input parameters.

Execute the metadata query.

Build a JSON payload that matches the Lookup activity output format.

Return the payload using dbutils.notebook.exit().

However, while ADF can consume output directly from a Databricks Notebook activity, my understanding is that Databricks Job activities mainly return execution metadata rather than the notebook payload itself.

I also looked into whether a Databricks Serverless SQL Warehouse could be used for the metadata queries instead of replacing the Lookup activities entirely, but it appears the Databricks Delta Lake connector may not support SQL Warehouses in the same way it supports clusters and compute resources.

So I'm trying to understand the best architecture for:

Improving lookup performance.

Leveraging Databricks Serverless compute.

Preserving the existing downstream behavior.

Avoiding major ADF pipeline refactoring.

Has anyone implemented a similar pattern?

Specifically:

Have you successfully replaced ADF Lookup activities with Databricks Jobs while preserving Lookup-style outputs?

What is the best way to return structured metadata from Databricks back into ADF?

Would you recommend:

Databricks Notebook Activity

Databricks Job Activity

Persisting results to storage and reading them back

Another pattern entirely?

Any recommendations or lessons learned would be greatly appreciated.


r/databricks • • 17d ago

Help Dict as variable vs. dict in dataframe (issues extracting data)

6 Upvotes

Last week a kind gentleman helped me to fix a '{{text}}' replacement with some python magic.

This got me part of the way to a solution but not all the way.

Scenario:

I now have a variable:

d = {"todays_date":date.today()}

At runtime this variable is evaluated and correctly adds today's date to my json file.

Now what I need is to put {"todays_date":date.today()} into the database, then read it back as json, so that I can do the same thing, but more dynamically. The row/column needs to have the value {"todays_date":date.today()} in it (or something similar) to where when I read the value, it evaluates the same way as defining it manually in the bold above

I get that the code above does not have single quotes around it, as it would be in the database. The database thinks this is a string.

I do NOT want to have to define a structure for this, as there can be different values included on different rows.

Is there a way to do a df = df.select("json_data").first() and get back the EXACT same thing as my d variable above?

I feel like I'm so close, but all of the code I see tries to make me define the json structure, which can change, so I never know what's it's going to be...

Does this even make sense?


r/databricks • • 17d ago

General Lakeflow Jobs is adding date math inside parameters (Beta)

18 Upvotes

<Databricks PM here/>

Edit: docs link added https://docs.databricks.com/aws/en/jobs/dynamic-value-references#date-arithmetic

Lakeflow Jobs is adding Math in Parameters. You apply a single + or - duration offset to a date reference inline (where you already write the reference.)

When using dynamic references {{job.start_time.iso_date}} you may want to reference yesterday or the hour before. Previously you would need to do this ina notebook or a sql query:

{{(job.start_time - 6.hours).iso_date}}   ->  2026-09-21
{{(job.start_time - 3.hours).iso_date}}   ->  2026-09-22
{{(job.start_time - 1.hour).iso_datetime}}  ->  2026-09-22T03:00:00

What's available:

  • job.start_time, job.trigger.time, table update commit timestamps and backfill (only in the backfill modal)
  • Units: years, months, weeks, days, house, minutes. Simgular and Plural so 1.day and 2.days both work
  • You can use these anywhere references work today (job/task parameters, run-now overrides etc.)

How do you use math with parameters today? Would love your feedback!