airflow.providers.google.cloud.links.base¶
Attributes¶
Classes¶
Base class for all Google links. |
Module Contents¶
- class airflow.providers.google.cloud.links.base.BaseGoogleLink[source]¶
Bases:
airflow.sdk.BaseOperatorLink
Base class for all Google links.
- When you inherit this class in a Link class;
You can call the persist method to push data to the XCom to use it later in the get_link method.
If you have an operator which inherit the GoogleCloudBaseOperator or BaseSensorOperator You can define extra_links_params method in the operator to pass the operator properties to the get_link method.
- property xcom_key: str[source]¶
XCom key with while the whole “link” for this operator link is stored.
On retrieving with this key, the entire link is returned.
Defaults to _link_<class name> if not provided.
- classmethod persist(context, **value)[source]¶
Push arguments to the XCom to use later for link formatting at the get_link method.
Note: for Airflow 2 we need to call this function with context variable only where we have the extra_links_params property method defined
- get_link(operator, *, ti_key)[source]¶
Link to external system.
- Parameters:
operator (airflow.models.BaseOperator) – The Airflow operator object this link is associated to.
ti_key (airflow.models.taskinstancekey.TaskInstanceKey) – TaskInstance ID to return link for.
- Returns:
link to external system
- Return type: