Implementing Tag Propagation Across Datasets, Charts, and Dashboards via Custom Actions

Original Slack Thread

Hi <@UV0M2EB8Q>, I am building a custom action for tag propagation. (I started here with your code:|[…]src/datahub_actions/plugin/action/tag/ I always like to try to reuse as much as I can, thanks! This code only add tags to datasets. I need the ability to add tags to charts and dashboards as well. Since this code only pulls in the action: config parameters tag_prefixes: from the yaml (see below). The issue I run into is this, I would need to define an emitter via REST, and need the gms_server and token in order to run the emitter, how do I pull in the datahub: information from the yaml in order to use it? The PipelineContext class does not have an emit method that I can use. Thanks for any direction.

  #type: "tag_propagation"
  type: "custom-tag-prop:CustomTagPropagationAction"
    - SourcesSDP
  server: "https://&lt;my-server&gt;/api/gms"
  token: "&lt;my-token&gt;"```

Hey <@U05HMP51HLJ>: there is a graph instance under self.ctx. that you can use to emit metadata


if you need the wrapped datahubgraph instance, you can get it via self.ctx.graph.graph

also, since I think this would be generally useful… please do contribute this enhancement back!

Thanks <@UV0M2EB8Q>. I didn’t think of the graph.graph I will give it a try and look forward to contributing!

<@UV0M2EB8Q>, the graph.graph worked and going through some testing. I will do a PR for the change to the in the next few days after I test it a little more. Thanks

Nice! cc <@U01GZEETMEZ> to keep track of the contrib when it comes through