-
Notifications
You must be signed in to change notification settings - Fork 91
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
dbt run --empty
throws a syntax error while the model is ran correctly without the --empty
flag
#412
Comments
yup, I can reproduce this-- figuring out what's going on, thanks for the report! |
So this does not seem to be something I can override easily-- the workaround I cooked up is to use a CTE instead of an alias here, so your model needs to turn into something like this:
The issue here is that the I'm going to file an issue upstream with the dbt-adapters folks to see how they want to handle this case going forward, but it's not something I can fix right now in the dbt-duckdb adapter itself AFAICT, so a workaround and a mental model of how this works is the best I can do for you at the moment. 🙇 |
Ah no it seems I'm wrong-- I think I can use the trick here dbt-labs/dbt-adapters#124 to fix this, going to put a PR together |
@jwills thanks a lot for the heads up! Will use the CTE workaround for now 😊 |
Fixes #412 by not requiring aliases for limit 0 clauses in dbt-duckdb
Hello,
dbt run --empty
seems to throw a syntax error whendbt run
works correctly.Without the flag:
The model :
This prevents me from running unit tests in the CI.
Not sure if the issue is caused by
dbt-duckdb
's implementation of the--empty
flag.Glad to help resolve this issue!
The text was updated successfully, but these errors were encountered: