An Azure relational database service.
Hello @Harshita Vishwakarma
It is possible that the string to datetime2 conversion is causing the issue.
When copying data from a source to a sink, it is important to ensure that the data types in the source and sink match. In your case, you are trying to copy data from a string data type in the source to a datetime2 data type in the sink.
To resolve this issue, you can use the Derived Column transformation in your mapping data flow to convert the string data type to a datetime2 data type.
Here's an example of how you can do this:
- Add a Derived Column transformation to your mapping data flow.
- In the Derived Column transformation, add a new column with a datetime2 data type.
- Use the toDate() function to convert the string data type to a datetime2 data type. Here's an example of how you can use the toDate() function:
toDate(Date1, 'yyyyMMdd')This will convert the Date1 string to a datetime2 data type using the 'yyyyMMdd' format. - Repeat the above steps for the Date2 field. Once you have added the Derived Column transformation and converted the data types, you can map the new datetime2 columns to the corresponding columns in your sink table. This should resolve the issue of NULL values being populated in your sink table.
I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.