Skip to content

fix: add Databricks to delta file_format condition#2156

Open
themavik wants to merge 2 commits intoelementary-data:masterfrom
themavik:fix/2154-databricks-delta-file-format
Open

fix: add Databricks to delta file_format condition#2156
themavik wants to merge 2 commits intoelementary-data:masterfrom
themavik:fix/2154-databricks-delta-file-format

Conversation

@themavik
Copy link
Contributor

@themavik themavik commented Mar 19, 2026

Summary

Fixes #2154.
Root cause: dbt_project.yml only checks for spark and fabricspark adapter types when setting file_format to delta, but Databricks uses target.type='databricks' which was missing from the condition, causing file_format to be None.
Fix: Added 'databricks' to the Jinja condition list.

Changes

  • elementary/monitor/dbt_project/dbt_project.yml: Added 'databricks' to the target.type check for delta file format

Testing

  • Verified fix addresses reported scenario (Databricks adapter now gets delta file format)
  • Change is minimal and follows existing code patterns

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Extended Delta file format configuration support to include Databricks target types alongside existing database platforms.

)

Root cause: dbt_project.yml only checks for 'spark' and 'fabricspark'
adapter types when setting file_format to 'delta', but Databricks uses
target.type='databricks' which was missing from the condition.

Made-with: Cursor
@github-actions
Copy link
Contributor

👋 @themavik
Thank you for raising your pull request.
Please make sure to add tests and document all user-facing changes.
You can do this by editing the docs files in this pull request.

@themavik themavik requested a deployment to elementary_test_env March 19, 2026 09:51 — with GitHub Actions Waiting
@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8639d3d0-c1bc-4a55-aa96-25699044e854

📥 Commits

Reviewing files that changed from the base of the PR and between 2f98ef7 and e103756.

📒 Files selected for processing (1)
  • elementary/monitor/dbt_project/dbt_project.yml

📝 Walkthrough

Walkthrough

Updated the Elementary CLI dbt project configuration to include the databricks adapter type in the conditional logic for setting Delta file format. Previously, only spark and fabricspark adapters were configured to use Delta format; this change extends that support to Databricks.

Changes

Cohort / File(s) Summary
Databricks Delta Format Configuration
elementary/monitor/dbt_project/dbt_project.yml
Extended the +file_format model configuration to include 'databricks' in the adapter type check, enabling Delta format selection for Databricks alongside existing Spark and Fabric Spark adapters.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hop hop, Databricks hops along,
Delta format now shines strong,
One line added, so clean and bright,
Alerts now run with pure delight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately and clearly describes the main change: adding Databricks to the delta file_format condition in dbt_project.yml.
Linked Issues check ✅ Passed The code changes fully address the requirements from issue #2154 by adding 'databricks' to the target.type check for delta file_format configuration, resolving compilation errors.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #2154; the single-line modification to dbt_project.yml precisely implements the requested fix with no extraneous changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

Copy link
Contributor Author

@themavik themavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes — the implementation looks correct and addresses the reported issue well.

@themavik
Copy link
Contributor Author

added test for the databricks target type.

@themavik themavik requested a deployment to elementary_test_env March 19, 2026 13:04 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Databricks adapter to Delta file format configuration in elementary CLI

1 participant