-
Notifications
You must be signed in to change notification settings - Fork 123
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
dbt snapshots 1.9 with empty source #906
Comments
Does using this PR remedy the issue, or do I have another snapshot bug: #904? |
I dont know. Will you be making a release with #904? |
yes, today. |
Please try with 1.9.2 and let me know |
Sorry to say that it does not. But I managed to fix the error. I have a setup with a macro to update dbt_valid_to when recreating snapshots from raw data. In our snapshots I have a post_hook that runs the macro set_dbt_valid_to with a variable called snapshot_start_date and it looks like this:
Randomly I got the same error here when the dbt_valid_to column was mainly NULLs. Once I changed |
Closing as I dont think dbt-databricks is causing this |
We just had 16 new snapshot tables deployed. All source tables was empty and one of them failed with the above error message. Once I filled upp all source tables the error was gone. We use an ephemeral model as the source of our snapshots to be able to filter out duplicates. |
BTW, I think the snapshot functionality is expecting 'valid to' to be a date in the far future, rather than null; at least that's how the functional tests are written |
Describe the bug
If the source table is empty we randomly get the following error message from Databricks:
Steps To Reproduce
Create a source table and do not fill with data.
Create snapshot with 1.9 definition in a yml file and run it.
The error message shows up randomly but on the same tables if you run it twice. We cannot see any patterns to this other than if there are some data in the source table the error goes away.
I should say that we are using an ephemeral view as "source"
relation: ref('bronze_ephemeral_catalogues_calculation_level')
.Expected behavior
The snapshot should execute without error.
Screenshots and log output
System information
The output of
dbt --version
:The operating system you're using:
The output of
python --version
:Additional context
No
The text was updated successfully, but these errors were encountered: