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

[Feature] Add TRUNCATE INSERT to materializations list #879

Open
3 tasks done
akmalsoliev opened this issue Jul 22, 2024 · 2 comments
Open
3 tasks done

[Feature] Add TRUNCATE INSERT to materializations list #879

akmalsoliev opened this issue Jul 22, 2024 · 2 comments
Labels

Comments

@akmalsoliev
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt-redshift functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Instead of creating a new table, the approach involves using a TRUNCATE operation followed by an INSERT to update the existing materialized tables, which already have predefined data types.

Describe alternatives you've considered

No response

Who will this benefit?

This feature benefits database administrators, data engineers, developers, business analysts, and organizations by efficiently updating large datasets in existing materialized tables without the need for creating new tables, ensuring data integrity and speeding up data refreshes and decision-making processes.

Are you interested in contributing this feature?

Yes

Anything else?

No response

@akmalsoliev akmalsoliev added enhancement New feature or request triage labels Jul 22, 2024
@amychen1776
Copy link

@akmalsoliev Does the delete+insert method for incremental materialization fit your use case here?https://docs.getdbt.com/docs/build/incremental-strategy#supported-incremental-strategies-by-adapter

@amychen1776 amychen1776 added awaiting_response and removed enhancement New feature or request triage labels Jul 25, 2024
@akmalsoliev
Copy link
Author

@amychen1776 Hello and sorry for a late reply. Using DELETE + INSERT is not ideal because it occasionally changes the predefined data type. For example, a VARCHAR(100) might unexpectedly become VARCHAR(250). This is not the desired behaviour; we want the operation to forcefully fail in such cases. I understand that this should not be happening, however, in practice this action occurred.
Additionally, DELETE + INSERT strategy is quite slow in comparison to TRUNCATE + INSERT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants