Skip to content

moveaxlab/dbt-error-example

Repository files navigation

DEMO PROJECT FOR DBT TEMP TABLES CLEANUP ERROR

Issue description

when using dbt to synch and incremental model if an error arises during the data synchronization the temporary tables with
pattern O$PT_<MODEL_NAME><TS> are not dropped.

System Dependencies

  • sqlplus
  • docker

Setup

if you already have a python dev environment you can skip Install Mise and gor directly to Install project if you need to set up the python environment rapidly you can leverage the .mise.toml as we do

Install Mise

in order to install mise follow these instructions then you can just cd into the repo folder and:

mise trust .mise.toml
mise install

Install project

if you already have a python dev environment you can install the project with

poetry install --no-root

Error Replication Procedure

to replicate the bug you just

  1. start the database container (it may take a while)
docker compose up
  1. create the source and target table
mise run db:execute tmp-tables-error-demo.init.sql
  1. run the dbt model
dbt run --models target_table

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages