Reputation: 5
I am trying to perform copy activity in ADF. Source for the pipeline is API(Json response) and Sink is Azure Sql data base.
I want to check, if the enddat is null then only i have take name field and map to sink column. Kindly note that i am using copy activity not data flow.
Response from API is in below format:
[
{
"id": "8d6c",
"customsiteid": "wew",
"country": "US",
"state": "CA",
"city": "San Jose",
"sampleIds": [
{
"name": "klio",
"acceptedat": "2016-02-02T00:00:00.000Z",
"enddat": null
},
{
"name": "jkdsjks",
"acceptedat": "2011-12-23T00:00:00.000Z",
"enddat": "2016-01-26T00:00:00.000Z"
}
]
},
{
"id": "kjkj",
"customsiteid": "iuewi",
"country": "UK",
"state": "Na",
"city": "Mnv",
"sampleIds": [
{
"name": "asa",
"acceptedat": "2017-02-02T00:00:00.000Z",
"enddat": "2019-01-26T00:00:00.000Zx"
},
{
"name": "wer",
"acceptedat": "2021-12-23T00:00:00.000Z",
"enddat": null
}
]
}
]
Please let me know the approach to achieve this scenario.
Upvotes: 0
Views: 749
Reputation: 6114
You can achieve this using 2 copy activities instead of one. The first one to stage the entire data in your SQL database and the second one to query only the records where enddat
is null.
select * from demo where enddt is null
Upvotes: 0