You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/13 14:06:24 UTC

[GitHub] [airflow] turbaszek commented on pull request #10318: [AIRFLOW-6706] Lazy load operator extra links (#7327)

turbaszek commented on pull request #10318:
URL: https://github.com/apache/airflow/pull/10318#issuecomment-673499705


   I tested it with:
   ```python
   # bq.py
   from airflow.models import BaseOperatorLink
   
   
   class BigQueryConsoleLink(BaseOperatorLink):
       name = 'BigQuery Console'
   
       def get_link(self, operator, dttm):
           return "teees"
   ```
   
   and DAG:
   ```python
   class CustomOp(DummyOperator):
       @property
       def operator_extra_links(self):
           return (BigQueryConsoleLink(),)
   
   
   with DAG("example_link",
       schedule_interval=None,  # Override to match your needs
       start_date=days_ago(1),
   ) as dag:
       task = CustomOp(task_id="task_withlink")
   ```
   
   I added `bq.BigQueryConsoleLink` to `BUILTIN_OPERATOR_EXTRA_LINKS` and I see no atomic cloud <3 
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org