Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 Materialization flag introduced #844

Open
wants to merge 4 commits into
base: 1.10.latest
Choose a base branch
from
Open

Conversation

benc-db
Copy link
Collaborator

@benc-db benc-db commented Nov 15, 2024

Description

Introduces the V2 Materialization flag (which is primarily going to be used with create table / incremental), and handles the first materialization to be pivoted based on the flag: Seeds. Will be going through each materialization in a separate PR to keep the changes scoped.

Go here to compare the difference in flows: https://github.com/databricks/dbt-databricks/blob/726e6e16d5aec864a37aadb443991d0da265e4b6/docs/seed_flow.md

Seeds are pretty close to ideal already, but had some no op statements that I removed (since we don't have transactions or indexes).

Checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

@@ -40,8 +93,6 @@
{{ get_csv_sql(create_table_sql, sql) }};
{% endcall %}

{% set target_relation = this.incorporate(type='table') %}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's more shared code that I can pull out, but I want to leave the existing materialization largely intact, since the whole reason to use the flag is to lower risk of significant changes. Also, eventually V1 will be deleted. I pulled out target_relation so that I could do the return statement at the top level.

import pytest


class MaterializationV2Mixin:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mixin that flips the flag on for test classes that include it.

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.

1 participant