Azure data factory - query pipeline by data annotations

JAY VORA 21 Reputation points
2020-10-23T21:37:28.577+00:00

Is there a way to programmatically query (using .net SDK) list of data factory pipelines by data annotations?

I can set data annotation when I run pipeline as explained here, but not sure how to query pipelines or filter pipelines using the same? https://azure.microsoft.com/en-us/resources/videos/azure-friday-enhanced-monitoring-capabilities-and-tagsannotations-in-azure-data-factory/

I see you can query pipeline runs here, but it does not show how to use data annotations filter?
https://learn.microsoft.com/en-us/rest/api/datafactory/pipelineruns/querybyfactory

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,188 questions
0 comments No comments
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,061 Reputation points
    2020-10-27T18:49:24.057+00:00

    Hello @JAY VORA and welcome to Microsoft Q&A.

    I have begun investigation into whether this is possible. First, I have attempted to use annotation in the REST api you linked.

    ...  
    "filters":[{  
    "operand":"annotations",  
    "operator": "Equals",  
    "values": ["anno2","IAmAnno"]}]  
    }  
    

    and received an error response

    {  
      "error": {  
        "code": "InvalidPipelineRunQueryFilterOperand",  
        "message": "'annotations' is not a valid filter operand. Allowed values are 'PipelineName, Status, RunStart, RunEnd, SandboxId, RunGroupId, LatestOnly, TriggeredByName'.",  
        "target": null,  
        "details": null  
      }  
    }  
    

    This suggests it is not yet possible to query directly on annotations. I will inquire internally to be sure.

    This said, it should be possible to locally filter by annotations, the results of a query.

    Thank you for your patience.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. JAY VORA 21 Reputation points
    2020-11-06T15:50:08.483+00:00

    Thanks for the feedback, how do I access annotations property? Can you point me to where to find annotations on the pipelineRun object https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.datafactory.models.pipelinerun?view=azure-dotnet ? @MartinJaffer-MSFT