astronomer/astronomer-cosmos

Link to dbt docs from task

Opened this issue · 1 comments

Description

We should be able to use this: https://airflow.apache.org/docs/apache-airflow/stable/howto/define-extra-link.html to link to dbt docs from the task instance view in the UI. This will require a few things that could be tricky:

  • Pass query params of URL to the iframe
  • Associate dbt docs with projects
  • This gets weird if we support multiple dbt project docs.

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!

Setting this as a 1.6 milestone. I played around with this and, well, there are a lot of extra complications in making this work aside from just multiple dbt projects. 😬 TLDR, what you really need is the information contained in the "fully qualified name" (fqn) of a node to link it to the docs properly, and we just don't really use that information right now in Cosmos. Most notably, the project name is not able to be inferred based on the construction of an operator. (The node type can be inferred from the base_cmd, and the node itself can be inferred from the --select / --models.) So this would require passing new information into the operator somehow.

There are a few more issues. One big one is that an external link is not nullable / cannot be disabled for an operator. This is an issue for Operators that do not tie to single nodes.