简体   繁体   中英

extract GUID and other attributes from pipeline within ADF?

I'm wanting to create my own log file to store various attributes each time a pipeline is executed. How do I add a step to my pipeline that records the pipeline GUID, timestamp for starting the process, timestamp for completion, completion status, successful record counts, error record counts, etc.?

I'm thinking I'd want need an output for different statuses but I'm not sure what to actually specify for the code to capture the different elements.

You are going to want to use the PowerShell cmdlet Get-AzureRmDataFactoryV2ActivityRun and direct the output to the desired logging mechanism.

Example Output:

 ResourceGroupName : ADF DataFactoryName : WikiADF ActivityName : MyWebActivity PipelineRunId : f288712d-fb08-4cb8-96ef-82d3b9b30621 PipelineName : DPWikisample Input : {method, url, headers, body...} Output : {operationstatus} LinkedServiceName : ActivityRunStart : 9/14/2017 12:20:57 AM ActivityRunEnd : 9/14/2017 12:21:00 AM DurationInMs : 2768 Status : Succeeded Error : {errorCode, message, failureType, target} 

For ADFv1, the applicable cmdlet is: Get-AzureRmDataFactoryRun

我想出了如何通过在管道中设置变量来做我现在需要做的事情,因为我没有从前一个用户那里得到任何其他反馈

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM