Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop staging dataset (schema) in Snowflake following the load #1961

Open
AhmetSamilCicek opened this issue Oct 17, 2024 · 1 comment
Open
Assignees
Labels
question Further information is requested

Comments

@AhmetSamilCicek
Copy link

Feature description

I am new to dlt and I have tested it to load data from Postgres into Snowflake. dlt creates a staging schema which is apparently created to "deduplicate and merge data with the destination". Could it be possible to add an option to drop the staging schema after the loading operation? Currently dlt allows only truncating the table (resource) in the staging schema.

Are you a dlt user?

Yes, I use it for fun.

Use case

No response

Proposed solution

No response

Related issues

No response

@rudolfix rudolfix added the question Further information is requested label Oct 20, 2024
@rudolfix
Copy link
Collaborator

rudolfix commented Oct 20, 2024

@AhmetSamilCicek we keep the staging dataset schema so the subsequent loads happen faster. it takes time to recreate all the tables. if you for some reason want to drop the staging dataset, you have an authenticated sql_client available after the load with which you can drop the staging dataset:
pipeline.sql_client() and then you can drop it via explicit DDL statement or

with client.with_staging_dataset():
   client.drop_dataset()

@rudolfix rudolfix self-assigned this Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: In Progress
Development

No branches or pull requests

2 participants