MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.29k stars 21.47k forks source link

ListByPipelineRun #19805

Closed djpirra closed 5 years ago

djpirra commented 5 years ago

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.

MohitGargMSFT commented 5 years ago

@djpirra Thanks for your feedback! We will investigate and update soon on it.

jason-j-MSFT commented 5 years ago

@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?

metin commented 5 years ago

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

camoisan commented 5 years ago

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 :)

linda33wj commented 5 years ago

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.

please-close