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

Update define-extra-link.rst #34547

Merged
merged 3 commits into from
Oct 4, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/apache-airflow/howto/define-extra-link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following code shows how to add extra links to an operator via Plugins:

from airflow.models.baseoperator import BaseOperator, BaseOperatorLink
from airflow.plugins_manager import AirflowPlugin
from airflow.models.taskinstancekey import TaskInstanceKey
uranusjr marked this conversation as resolved.
Show resolved Hide resolved


class GoogleLink(BaseOperatorLink):
Expand Down Expand Up @@ -81,7 +82,8 @@ tasks using :class:`~airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Ope
.. code-block:: python

from airflow.plugins_manager import AirflowPlugin
from airflow.models.baseoperator import BaseOperatorLink
from airflow.models.baseoperator import BaseOperator, BaseOperatorLink
from airflow.models.taskinstancekey import TaskInstanceKey
from airflow.providers.amazon.aws.transfers.gcs_to_s3 import GCSToS3Operator


Expand Down Expand Up @@ -118,7 +120,9 @@ Console, but if we wanted to change that link we could:
.. code-block:: python

from airflow.plugins_manager import AirflowPlugin
from airflow.models.baseoperator import BaseOperatorLink
from airflow.models.baseoperator import BaseOperatorLink, BaseOperator
from airflow.models.taskinstancekey import TaskInstanceKey

from airflow.models.xcom import XCom
uranusjr marked this conversation as resolved.
Show resolved Hide resolved
from airflow.providers.google.cloud.operators.bigquery import BigQueryOperator

Expand Down