Unable to add conditional statement while doing copy activity in ADF

Viewed 88

I am trying to update a table in my database. For that I am using a copy activity.Here source dataset is an http api. The data from source is as below.

[
{
"CurrentVal":{
"col":[
{
"@school": yes",
"@theatre":".1"
},
{
"@school":"no",
"@theatre":".1"
}
]
}
}
]

And the target is my sql table. Before updating to table, I need to check whether the input column have any NAN value, Then I need to update null in database column. The copy condition is working. But How this case condition I can add here? How I can achieve this in database?

1 Answers

You either need to use IfCondition activity or Data Flow transformation in Azure Data Factory. The Data Flow transformation allows you to fill the NaN values with the user given value.

To handle NAN or NULL values in Azure data factory, create derived column in Dat Flow activity and use iifNull({ColumnName}, '<Value>') expression. Change <value> with the user given value.

enter image description here

enter image description here

Once the Value has been updated, you can write it to the sink.

Related