Failure : Update records in Cosmos using Azure Data Factory data flows

Anand 1 Reputation point
2022-01-21T11:51:05.693+00:00

Hi,

I am facing the failure while updating the records in cosmos using adf dataflow.
Source Schema : flag: Integer, planogramid: Interger, id: String
Target Schema : flag: Integer, planogramid: Interger, id: String
Partition Key : planogramid

The requirement is we get a csv file with distinct planogramid's and based on these planogramid's we need to update the flag to 0 in cosmos. We are Joining the csv file with source (cosmos collection) and records from this join we are setting the flag =0 in derived column activity after that In Alter Row activity the setting is set to Update if : 1==1 .

167251-mapping.png
167120-error.png

Thanks

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,438 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,491 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-01-24T11:35:50.187+00:00

    Hi @Anand ,

    Thank you for posting query in Microsoft Q&A Platform.

    From error message, it looks type cast issue. Integer value is not able to cast to string.

    Could you please make sure your data types for columns in both source transformations matches with each other? under projection tab you can modify data types of your columns.

    You can also use derived column transformation and use toString() function to type case specific column to string type.

    Hope this helps. If not, could you please share your implementation of every transformation along with data preview at that transformation level. So that we can repro scenario and try to spot issue exactly.

    -----------

    Please consider hitting Accept Answer button. Accepted answers helps community as well.