dbt snapshot fails

Hi,
I get snapshop datatypes error
Value has type STRUCT<module STRING, reference_entity_class STRING, reference_table STRING, ...> which cannot be inserted into column created_by, which has type STRUCT<module STRING, reference_entity_class STRING, reference_table STRING, ...> at [16:33]
the problematic column is a struct and there were new fields/subcolumns added. Does this mean snapshots cannot account for schema changes in nested columns, or am i missing something?
Thank you so much in advance!
Attached on the left is the updated schema of the tmp table to be merged, on the right is the original table

1 Like

Can you post the config block of your snapshot model? Might be something in there. Also does the model itself run fine locally?

1 Like

Hi Fraser and thank you for replying!
Attached is the screenshot of the config block. Running it locally also produces the same error.
Thank you for trying to help!

I just tried to reproduce this on a simple test model and it failed again with the same error.
Created initial snapshot of a table that contains nested column → Added one more subcolumn to the nested column of the table → Tried to ran snapshot and it failed.
So it does look like snapshots doesn’t not capture schema changes in the nested fields

Hey, having the exact same issue. Please how did you resolve your problem?

still not solved unfortunately. Ended up rebuilding the snapshot. I think its a bug, i opened an issue in dbt’s repo