Hello NishimuraChinatsu-9854, You can achieve this by GetMetadata activity to get the number of rows in the file. If the number of rows is zero, then the file is empty. Please see the below steps:
- add Get Metadata activity to get the number of rows in the file.
Field list - Column count
- If Condition activity to check if the number of rows is zero.
Expression: @equals(activity('Get Metadata1').output.count, 0)
- If the number of rows is zero, proceed to the Delete activity.
- If the number of rows is not zero, proceed to the next activity.
To segregate the empty data files, you can use the Filter activity to filter out the files with zero rows and move them to a separate folder.
- Get Metadata activity to get the number of rows in the file.
- Filter activity to filter out the files with zero rows.
- Copy activity to copy the filtered files to a separate folder.
- Delete activity to delete the filtered files from the original folder.