Hi! Pretty new to dbt and have successfully implem...
# community-support
k
Hi! Pretty new to dbt and have successfully implemented the elementary package, but every time I manually run 'dbt build', it truncates the elementary tables in Snowflake and loads the new records. Any idea why this is happening instead of appending records? I do NOT have this variable set in my dbt project, but wondering if it has to do with this issue?
Copy code
vars:
  elementary_full_refresh: true
n
Hey @Kayla Barletta 👋🏼
dbt build
command does a few things - basically, build and test your project resources. Every time you “rebuild” your project, Elementary saves the up-to-date data. This keeps the data fresh.
k
@Noy Arie Hello! I have the same challenge when I do dbt run though. It is not appending records to the snowflake tables/ views, it is truncating and loading. I cant find anything in my config file that is making this happen either
n
dbt build
is running
dbt run
command as you can see here - so running
dbt run
won’t give a different result. By design, as you can see here, the package overrides the existing rows of the artifacts tables like:
dbt_models
,
dbt_tests
,
dbt_sources
,
dbt_exposures
,
dbt_metrics
.
k
@Noy Arie Okay, do you have any advice for me if I want to manually execute dbt runs and have the records append? Or do I need to set up some sort of automated pipeline for that to happen
n
I am not sure I understand your question. If you added Elementary’s dbt package to your dbt project, the artifact records (in dbt_models, dbt_tests, dbt_sources, etc.) will replaced by an updated version after each execution of a dbt command.
k
Hi @Noy Arie — Let me try to explain. For the Elementary run results such as MODEL_RUN_RESULTS or DBT_INVOCATIONS, I want records to append each time I manually run dbt, not replace. How it is configured now, each time I manually run, it replaces the records in those views in snowflake. Is there a way to configure these tables in Snowflake so that each time I run dbt, that can happen? Let me know if this is still not clear
Hi @Noy Arie Wanted to follow up here and see if you have any ideas?
o
Hi @Kayla Barletta, picking up here 😄
model_run_results
and
dbt_invocations
, among some other tables in elementary, should be incremental, so its definitely weird that it truncates them for you... 🤔 I'd like you to share a few things if you can: • your
dbt_project.yml
file. • your
dbt.log
file. • the exact dbt command that causes the issue if you prefer, you can share those privately