Fault tolerance and log the incompatible rows in Azure Blob storage

柔情痞子 提交于 2019-12-13 09:51:03

问题


Customer 's requirements:

  1. using use azure data factory to import csv file in blob storage to SQL data warehouse.

  2. using the strategy "Fault tolerance and log the incompatible rows in Azure Blob storage" in ADF.

  3. And using Azure Function to archive the processed file to other place in blob storage: one place for those files are imported successfully and one for fail files (the files have incompatible data - wrong format, wrong length)

=> so I need get value of skippedRowCount of Activity Window to know this activity which has some incompatible rows? Is there any ways to get that ways or any solution to solve my problem? Many thanks.


回答1:


In ADF V2, the number of skipped rows is returned as "rowsSkipped" property of copy activity output. See these two links: https://docs.microsoft.com/en-us/azure/data-factory/copy-activity-overview#monitoring and https://docs.microsoft.com/en-us/azure/data-factory/copy-activity-fault-tolerance#monitor-skipped-rows

ADF V2 also allows you to use the output from a previous copy activity in the subsequent activity, using an expression like "@activity('MyCopyActivity').output.rowsSkipped")". Here is an example of how to use output form Lookup activity, and you can adapt to your particular situation.

For you use case, you can chain the copy activity with two Web activities, one to invoke the file archive for successful files, and another to record/reprocess failed rows logged in Storage blob or ADLS.



来源:https://stackoverflow.com/questions/48088308/fault-tolerance-and-log-the-incompatible-rows-in-azure-blob-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!