Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add operator extra link for Data Docs in the GreatExpectationsOperator #48

Closed
josh-fell opened this issue Feb 22, 2022 · 3 comments
Closed

Comments

@josh-fell
Copy link

In Airflow, there is a feature which allows for external links to be present as buttons on the Task Instance modal in the Airflow UI called an operator extra link. This feature is really useful to directly navigate from the Airflow UI to an external site which may be for monitoring a third-party execution that Airflow just triggered, handy documentation, etc.

IMO linking to Data Docs directly from a GreatExpectationsOperator task would be really beneficial to users and increase the holistic visibility that's available at their fingertips.

@talagluck
Copy link
Contributor

Hi @josh-fell - this is a really cool idea! The location for the Data Docs sites would be available through the Data Context, by using DataContext.get_docs_sites_urls(), which would be available via the main Operator. What would be the best way of passing this information out of the Operator and into a Plugin for these purposes?

@josh-fell
Copy link
Author

josh-fell commented Mar 28, 2022

The easiest, and the most widely-used, way to get that data into an operator link is via XCom. If you can push a URL to XCom or whatever values would be needed to build the URL string, you can have the get_link() method that would be overwritten to return the URL.

For some examples, check out Azure Data Factory and dbt Cloud providers. Then in the GreatExpectationOperator you can add the link as an attribute. Something like:

class GreatExpectationsOperator:
    ...
    operator_extra_links = (DataDocsLink(),)

    ...
    def __init__(...):

@denimalpaca
Copy link
Contributor

Completed in 0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants