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

Set default file format to parquet #422

Closed
wants to merge 6 commits into from

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Aug 9, 2022

resolves #363

Description

We already set this default here, but it's clearly not flowing through properly, because AdapterConfig doesn't really seem to be working in dbt-core (dbt-labs/dbt-core#5236):

file_format: str = "parquet"

Let's set the default explicitly in the macro, so that if the user hasn't provided a file_format, dbt-spark uses Parquet. This prevents weird issues with query rewrite in Databricks SQL warehouses, too (#236).

Update: If the user is connecting via ODBC (= Databricks), let's use delta as the default file format instead. This helps out Databricks SQL warehouse connections, which can only write Delta-formatted tables.

Checklist

  • I have signed the CLA
  • 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-spark next" section.

@cla-bot cla-bot bot added the cla:yes label Aug 9, 2022
@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-spark contributing guide.

@jtcohen6 jtcohen6 force-pushed the fix/default-file-format-parquet branch from e860c50 to 62e3c61 Compare August 11, 2022 11:02
@jtcohen6
Copy link
Contributor Author

Running into more issues on ODBC cluster + endpoint than I'm able to debug right now. I'm going to close this PR for now; someone else could pick up this work and try to carry it over the finish line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-676] Set default table type to parquet (instead of implicit default text)
1 participant