Campaign: Update Data Activity Failing and uploaded columns’ order shifted
Description description
The Update data activity in a workflow started failing with an error:
ODB-240000 ODBC error: String ‘2022-05-31 08:45:23.000Z’ is too long and would be truncated…
WDB-200001 SQL statement 'COPY INTO wkf… could not be executed.
We could see that the log, ‘2022-05-31 08:45:23.000Z’ wass being ingested into "[ “SISOA2”:14] column but the data mapping from update data activity was not configured that way.
Resolution resolution
The copy into Snowflake was failing due to 2 records out of ~25M in the dataset had a special control character (STX / \x02) embedded in the device_use_language_code field. This character conflicted with the CSV record delimiter used during bulk loading, which caused the row to split incorrectly and shifted the columns which is why the load_datetime timestamp value (2022-05-31 08:45:23.000Z) ended up in the SISOA2 column (VARCHAR(2)) and got rejected as too long.
The solution was to edit device_use_language_code field for these two records in Redshift data source and restart the workflow.