Hello Experts,
I need your expertise advice on my issue. My problem is, dbt run command is creating table with model file name instead of alias name from yml configuration.
I have a schema.yml as follows.
version: 2
models:
- name: employees
config:
alias: emp
My employees.sql model as follows.
{{
config
(
materialized='incremental',
incremental_strategy='insert_overwrite',
)
}}
select 1 as empid, 'ABC' as name union all
select 2 as empid, 'PQR' as name
Now, when I run following command, dbt creates table named as employees not emp.
dbt run --select employees --full-refresh
It worked as expected for all other models except this one.
The only difference between other models and this model is that, I first added entry in my schema.yml file-> commit changes.
Then on next day, I created model employees.sql → commit changes.
For all other models, I first created model file and then edited yml file.
Is there any way to inform dbt to refresh yml file changes or pass path of yml file? Or is there any other way to fix this issue?
Could you please share your thoughts on how should I fix this issue?
Thanks in advance.