Skip to content

Conversation

@haritamar
Copy link
Collaborator

@haritamar haritamar commented Oct 7, 2025

Summary by CodeRabbit

  • New Features
    • Improved compatibility with dbt-fusion on Databricks when creating temporary views, enabling the adapter to use fusion-specific view handling.
  • Bug Fixes
    • Fixed temporary relation creation on Databricks under dbt-fusion to reduce workflow failures.
  • Chores
    • Streamlined CI matrix by removing a forced Postgres + specific dbt version combo, aligning tests with latest/pre-release configurations.

@linear
Copy link

linear bot commented Oct 7, 2025

@coderabbitai
Copy link

coderabbitai bot commented Oct 7, 2025

Walkthrough

Removes a specific Postgres dbt 1.8.0 include from a GitHub Actions workflow and updates a Databricks macro to branch on dbt-fusion: using base_relation.incorporate(..., type='view') for fusion and api.Relation.create(..., type='view') for non-fusion, no signature change.

Changes

Cohort / File(s) Summary
CI workflow matrix adjustment
.github/workflows/test-all-warehouses.yml
Removed explicit Postgres dbt-version 1.8.0 include; retained postgres with latest_pre and fusion variants for other warehouses.
dbt macro fusion-aware temp relation
macros/utils/table_operations/make_temp_relation.sql
In databricks__edr_make_temp_relation, added conditional: if elementary.is_dbt_fusion() then use base_relation.incorporate(path={"identifier": tmp_identifier}, type='view'); else use api.Relation.create(identifier=tmp_identifier, type='view'). No signature change.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant Macro as databricks__edr_make_temp_relation
    participant Elem as elementary
    participant BaseRel as base_relation
    participant API as api.Relation

    Caller->>Macro: invoke(tmp_identifier, base_relation)
    Macro->>Elem: is_dbt_fusion()
    alt Fusion path
        Macro->>BaseRel: incorporate(path={identifier: tmp_identifier}, type='view')
        Note right of BaseRel: Constructs temp relation via incorporate (fusion-specific)
        BaseRel-->>Macro: temp_relation
    else Non-fusion path
        Macro->>API: create(identifier=tmp_identifier, type='view')
        Note right of API: Constructs temp relation via API create (non-fusion)
        API-->>Macro: temp_relation
    end
    Macro-->>Caller: return temp_relation
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A whisk of whiskers, a branch in two,
Fusion winds whisper, “incorporate will do.”
Old paths remain, steadfast and clear,
CI trims a matrix, less clutter to steer.
I thump with joy—temp views anew 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Ele 5120 fusion databricks bugfix" clearly indicates this PR addresses the ELE-5120 fusion integration issue on Databricks, concisely summarizing the primary change without extraneous details. A reviewer scanning the history can immediately grasp that this is a targeted bugfix for the fusion adapter on Databricks.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ele-5120-fusion-databricks-bugfix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 245bee8 and 79fb84f.

📒 Files selected for processing (1)
  • macros/utils/table_operations/make_temp_relation.sql (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • macros/utils/table_operations/make_temp_relation.sql
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: test (latest_official, athena) / test
  • GitHub Check: test (fusion, databricks_catalog) / test
  • GitHub Check: test (fusion, bigquery) / test
  • GitHub Check: test (latest_pre, postgres) / test
  • GitHub Check: test (latest_official, dremio) / test
  • GitHub Check: test (1.8.0, postgres) / test
  • GitHub Check: test (latest_official, clickhouse) / test
  • GitHub Check: test (latest_official, bigquery) / test
  • GitHub Check: test (latest_official, snowflake) / test
  • GitHub Check: test (latest_official, databricks_catalog) / test
  • GitHub Check: test (latest_official, trino) / test
  • GitHub Check: test (fusion, redshift) / test
  • GitHub Check: test (latest_official, postgres) / test
  • GitHub Check: test (latest_official, redshift) / test
  • GitHub Check: test (fusion, snowflake) / test

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2025

👋 @haritamar
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 the elementary repository.

include:
# If we're not running on a specific dbt version, then always add postgres on 1.8.0
- dbt-version: "${{ inputs.dbt-version || '1.8.0' }}"
warehouse-type: postgres
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The tests are no longer compatible with dbt<1.10.8 (though the package itself still is)

@haritamar haritamar merged commit 720ed1b into master Oct 8, 2025
31 of 34 checks passed
@haritamar haritamar deleted the ele-5120-fusion-databricks-bugfix branch October 8, 2025 10:49
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.

3 participants