Closed djpirra closed 5 years ago
@djpirra Thanks for your feedback! We will investigate and update soon on it.
@linda33wj I see 'QueryByPipelineRun' here: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.datafactory.activityrunsoperationsextensions.querybypipelinerun?view=azure-dotnet
I can't find 'ListByPipelineRun', could you take a look?
Looks like article is out of date. It is using an old version of Microsoft.Azure.Management.DataFactory package. I was able to make it work with 0.8.0-preview https://www.nuget.org/packages/Microsoft.Azure.Management.DataFactory/0.8.0-preview
Hey all, I was able to workaround ListByPipelineRun by using the QueryByPipelineRun() function of ActivityRuns: https://docs.microsoft.com/en-us/rest/api/datafactory/activityruns/querybypipelinerun
Getting this to work was surprisingly simple, the only changes I had to make were to replace ListByPIpelineRun with QueryByPipelineRun, and create a RunFilterParameters object that contained my params. https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.datafactory.models.runfilterparameters?view=azure-dotnet
I also needed to change the syntax in the if/else block so that the Value property of the queryResponse object could be accessed; the list of ActivityRuns is contained in the Value property of the object.. My code is below:
Console.WriteLine("Checking copy activity run details..."); RunFilterParameters filterParams = new RunFilterParameters(DateTime.UtcNow.AddMinutes(-10), DateTime.UtcNow.AddMinutes(10)); ActivityRunsQueryResponse queryResponse = client.ActivityRuns.QueryByPipelineRun(resourceGroup, dataFactoryName, runResponse.RunId, filterParams); if (pipelineRun.Status == "Succeeded") Console.WriteLine(queryResponse.Value.First().Output); else Console.WriteLine(queryResponse.Value.First().Error); Console.WriteLine("\nPress any key to exit..."); Console.ReadKey();
Let me know if you have any questions :)
Thank you all for raising the issue and sharing the right instruction across! The monitoring section in this quickstart has been updated. Sorry for the delay.
Apparently the method ListByPipelineRun does not exist anymore on the ADF Client? Now I only see QueryByPipelineRun. Should this be updated?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.