A task which has been running okay for months started to build latency.
22007 NativeError: 100040 Message: Date '0000-00-00' is not recognized
This was due to a wrong date. We found an expression for the the bad date from the Source.
Steps to resolve the issue:
- Open the target table from Replicate GUI
- Select "Transform" from the left menu
- For all the dates you see on the right side click on the "fx" and paste the below expression on the expression builder.
- Paste the below expression in Build Expression window on the right side.
WHEN strftime('%Y-%m-%d', $ModifiedDate) IS NULL THEN
- You can test it by clicking on parse expression and test expression. If the value, you entered is a valid date then the output should be the valid date. If the value, you entered is null you should see '0001-01-01' like above.