duckdb / dbt-duckdb

dbt (http://getdbt.com) adapter for DuckDB (http://duckdb.org)
Apache License 2.0
895 stars 83 forks source link

Fix bug in macros/utils/upstream.sql #125

Closed vlieven closed 1 year ago

vlieven commented 1 year ago

Fixes: #124

jwills commented 1 year ago

I see the bug and it's pretty obvious; really surprised that this integration test didn't catch it tho: https://github.com/jwills/dbt-duckdb/blob/master/tests/functional/adapter/test_rematerialize.py

jwills commented 1 year ago

cc @AlexanderVR

AlexanderVR commented 1 year ago

Arrrg, the dbt comma vs space strikes again. Basically it's creating a null selection so the test always passes. This was already a hard-fought one-line fix https://github.com/jwills/dbt-duckdb/pull/109/files but the bug found its way back.

So there are two issues exposed by fixing the test here. Thanks @vlieven for finding the model vs relation bug.

There is also a minor issue of which config to use for handling e.g. the partitioning. I've submitted https://github.com/jwills/dbt-duckdb/pull/126 to handle all of these

jwills commented 1 year ago

@AlexanderVR I assume I can close this, as the fix was included in your PR?

vlieven commented 1 year ago

Thanks for fixing this!