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

When a column is removed, the incremental schema change ignore option fails to function and results in a failure. #581

Closed
case-k-git opened this issue Feb 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@case-k-git
Copy link
Contributor

Describe the bug

When processing incrementally, adding new columns is ignored by the ignore setting. However, when a SQL model is modified to remove columns, it fails despite the ignore setting. This is because it attempts to query a column that does not exist in the created temp table. According to the dbt documentation, the job should be designed not to fail when ignored, so it has been corrected.
Dbt documentation

Dbt documentation

Similarly, if you remove a column from your incremental model, and execute a dbt run, this column will not be removed from your target table.

So this should not happen
https://docs.getdbt.com/docs/build/incremental-models#default-behavior

Steps To Reproduce

When executed with the ignore option in an incremental strategy, a table is created on the first run. Removing a column from the SQL leads to a job failure when dbt is executed.

Expected behavior

A clear and concise description of what you expected to happen.
schema change will be ignore and inset into null value

Screenshots and log output

If applicable, add screenshots or log output to help explain your problem.

I will update

System information

The output of dbt --version:

The operating system you're using:

The output of python --version:

Additional context

Add any other context about the problem here.

@case-k-git
Copy link
Contributor Author

This has been merged so I will close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant