airflow.operators.generic_transfer
¶
Module Contents¶
Classes¶
Moves data from a connection to another. |
- class airflow.operators.generic_transfer.GenericTransfer(*, sql, destination_table, source_conn_id, destination_conn_id, preoperator=None, insert_args=None, **kwargs)[source]¶
Bases:
airflow.models.BaseOperator
Moves data from a connection to another.
Assuming that they both provide the required methods in their respective hooks. The source hook needs to expose a get_records method, and the destination a insert_rows method.
This is meant to be used on small-ish datasets that fit in memory.
- Parameters
sql (str) – SQL query to execute against the source database. (templated)
destination_table (str) – target table. (templated)
source_conn_id (str) – source connection
destination_conn_id (str) – destination connection
preoperator (str | list[str] | None) – sql statement or list of statements to be executed prior to loading the data. (templated)
insert_args (dict | None) – extra params for insert_rows method.