Reputation: 11
when I add VALIDATION_MODE = 'RETURN_ERRORS' FILES=('bad.csv')
in my copy into statement, I get error which error code is 002302. message as SQL Compilation error: Expression not supported within a VALIDATE expression
. I have a column which type is variant.
anybody has idea?
thanks
Upvotes: 1
Views: 812
Reputation: 25903
the help notes:
VALIDATION_MODE does not support COPY statements that transform data during a load. If the parameter is specified, the COPY statement returns an error.
Which implies you are doing some form of JSON/Variant data processing in the COPY statements select. Which is valid without VALIDATION_MODE = 'RETURN_ERRORS'
So can you copy the data into a staging table, and do zero JSON process, to "just have raw data" which in a second command to merge/insert into a processed form?
Upvotes: 1