You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several statements use the {{ source() }} macro to gather the name of the table/pipe.
When running our external tables/pipe on the CI, we use the --empty flag.
Here the source name gets overridden by sub-select using where false limit 0.
Hence all these statements raises compilation errors.
Example: create or replace table (select * from db.schema.name where false limit 0)
To have a proper, automated deployment we execute the stage_external_sources() macro as a pre_hook of the downstream staging model.
Thats why we have just one command with the additional empty flag.
Steps to reproduce
Create snowpipe via yaml definition
Create a sql model on top
Add a pre_hook executing the snowpipe
Run the model adding the --empty flag
Expected results
Actual results
Screenshots and log output
System information
The contents of your packages.yml file:
Which database are you using dbt with?
redshift
snowflake
other (specify: ____________)
The output of dbt --version:
dbt Cloud latest
The operating system you're using:
The output of python --version:
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
Several statements use the
{{ source() }}
macro to gather the name of the table/pipe.When running our external tables/pipe on the CI, we use the
--empty
flag.Here the source name gets overridden by sub-select using
where false limit 0
.Hence all these statements raises compilation errors.
Example:
create or replace table (select * from db.schema.name where false limit 0)
The dbt documentation recommends to use
.render()
for such cases: https://docs.getdbt.com/reference/commands/build#the-render-methodTo have a proper, automated deployment we execute the
stage_external_sources()
macro as a pre_hook of the downstream staging model.Thats why we have just one command with the additional empty flag.
Steps to reproduce
--empty
flagExpected results
Actual results
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
:dbt Cloud latest
The operating system you're using:
The output of
python --version
:Additional context
The text was updated successfully, but these errors were encountered: