Skip to content
Advertisement

Snowflake Failed to cast variant value “{TIMESTAMP VALUE}” to TIMESTAMP_NTZ

Above is the copy statement that I have made. But I keep getting the following error “Failed to cast variant value “2020-09-265T08:03:42.358Z” to TIMESTAMP_NTZ”

Advertisement

Answer

There’s a problem with the input data: September 265 is not a date.

If you want to parse that date to null, you can use TRY_CAST instead.

If you want to attempt to fix the date (September 26? September 25?), you could try going through a regex first.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement