question

HarithaGavara-2934 avatar image
0 Votes"
HarithaGavara-2934 asked HarithaGavara-2934 commented

avoid copying empty json file into adls

Hi,

I have developed a pipeline which brings data from rest api and copies into adls, but sometimes we are not receiving data and an empty array is copying into adls,

could anyone help me how to avoid this

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NandanHegde-7720 avatar image
0 Votes"
NandanHegde-7720 answered HarithaGavara-2934 commented

Hey,
Can you share the output format of the REST API?
Below can be 1 of the methods:

Use web activity to get the result of REST API and leveraging the web activity output, you can use If activity with @empty() expression to check whether the output is present or empty.
If empty then ignore else leverage Copy activity

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Nandan,

Thanks a lot, it is working.

But do we have another option to do this check , something like lookup activity?

0 Votes 0 ·

tried with lookup, and iam able to acheive this.
Thank you

1 Vote 1 ·