Closed elliottohara closed 3 years ago
I believe this is the same as bug https://github.com/fishtown-analytics/dbt-external-tables/issues/43 and there's a PR submitted for a fix https://github.com/fishtown-analytics/dbt-external-tables/pull/47, which worked for me... but I'm not sure why it hasn't been committed into master yet.
Thanks for the detailed report @elliottohara! As @jasonzondor notes, I'm hopeful that #47 (just merged) offers a resolution for this. If that's not the case, let's figure out what else is at play.
@jtcohen6, I just went through and tested again, and it is not fixed in https://github.com/fishtown-analytics/dbt-external-tables/pull/47. The only way to get it to work was to wrap the alter refresh statement in BEGIN and COMMIT statements. I'm sure there's a more "correct" way to handle this but that's a bit beyond my knowledge of dbt development for the time being.
Describe the bug
External tables do not refresh on snowflake.
Steps to reproduce
When running
dbt run-operation stage_external_sources
I expect my external tables to be refreshed. While I do see the queries being executed and get results for all new files, subsequent queries to the external table do not show the new results.Expected results
Results should be committed
Actual results
Results are not committed.
Screenshots and log output
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: Docker image for 0.19.1
The output of
python --version
:Additional context
I've modified the
snowflake/refresh_external_tables.sql
file starting at line 13 like so and it does the issue. I just don't know if this is the preferred way to handle it since the macro is expected to return an array of commands, not execute actual statements.