[Bug] microbatch models generate error when using ref with alias #184
Labels
feature:microbatch
Issues related to the microbatch incremental strategy
pkg:dbt-postgres
triage:product
type:bug
Something isn't working
Is this a new bug?
Current Behavior
when writing a dbt microbatch model:
code is compiled to:
Problem is, whenever a microbatch model is used with an alias, it throws an error.
Because basically it is passing two aliases:
code is compiled to:
A workaround I found to bypass this:
code is compiled to:
A little ugly but it works
Expected Behavior
When using alias with a microbatch reference, using this syntax should not throw an error:
Steps To Reproduce
1. Git clone this repo
2. Run astro dev start on terminal
This will start an astro-cli project with postgres and airflow. The host (172.18.0.2) available in
airflow_settings.yaml
anddbt/profiles.yaml
is default for when you don't have any other docker containers.If you have, you might need to change those settings.
To do that:
If you ever need to change settings, run this to rebuild your project:
3. Run dbt though airflow or terminal
using airflow UI
admin
and password:admin
microbatch_issue
ormicrobatch_issue_full_refresh
dagdbt_run_tree_routes_with_alias_error
tree_routes_no_error
task also, this shows the workaround working.using terminal
Run this to set var DBT_HOST in your env:
then:
cd dbt dbt run --debug
4. check errors
Relevant log output
Airflow task
tree_routes_with_error
log:Airflow task
tree_routes_no_error
log:Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: