Home > Net >  Azure Data Factory - How to skip empty sheet
Azure Data Factory - How to skip empty sheet

Time:05-31

I have an excel file with 3 sheets, in one situation the third sheet is empty, in that situation I need to skip that dataflow. Every dataflow is for specific Work sheet

Pipiline image

CodePudding user response:

You can use the lookup activity to read the data from the sheet and using the if condition activity, validate the count and process the activities under true or false scenarios.

  1. Get the count from the lookup activity.

enter image description here

  1. In the if condition activity, check if the count of lookup and if it satisfies greater than zero condition add your data flow activity in true activities, else nothing in false activities.

expression:

@greater(int(activity('Lookup2').output.count),0)

enter image description here

  • Related