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

Databricks SQL Analytics endpoint does not support set statements #133

Closed
jtcohen6 opened this issue Dec 31, 2020 · 2 comments · Fixed by #141
Closed

Databricks SQL Analytics endpoint does not support set statements #133

jtcohen6 opened this issue Dec 31, 2020 · 2 comments · Fixed by #141
Labels
bug Something isn't working

Comments

@jtcohen6
Copy link
Contributor

Describe the bug

Screen Shot 2020-12-31 at 12 07 12 PM

We use set statements as part of the incremental materialization, specifically for the insert_overwrite strategy with partitioned tables:

https://github.com/fishtown-analytics/dbt-spark/blob/0e75069c3c223546ecec2c6038534d826e9a7dd8/dbt/include/spark/macros/materializations/incremental.sql#L103-L111

This is currently causing a failure in our integration tests.

Incidentally, the SQL Analytics endpoint doesn't support the merge strategy either, since it requires creating a temporary view as currently written. Databricks has promised that create temp view will eventually be supported by the new endpoint.

Steps To Reproduce

Try running any incremental model while connected to a SQL Analytics endpoint

Expected behavior

The weird thing is that set statements used to work. I only saw this crop up in the integration tests for #132; something has definitely changed in the last few weeks.

@jtcohen6 jtcohen6 added the bug Something isn't working label Dec 31, 2020
@Fokko
Copy link
Contributor

Fokko commented Dec 31, 2020

Weird stuff. Did the Databricks Runtime change?

It works with Runtime 7.5:
image

@jtcohen6
Copy link
Contributor Author

@Fokko That's just the problem: this works fine on interactive / all-purpose clusters running the latest Databricks runtime versions; it's not working on SQL Analytics endpoints (accessible via the new / preview Redash query editor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants