airflow.providers.common.io.operators.file_transfer

模組內容

類別

FileTransferOperator

將檔案從來源複製到目的地。

class airflow.providers.common.io.operators.file_transfer.FileTransferOperator(*, src, dst, source_conn_id=None, dest_conn_id=None, overwrite=False, **kwargs)[原始碼]

基底類別: airflow.models.BaseOperator

將檔案從來源複製到目的地。

如果需要,這會將檔案從來源串流到目的地,因此不需要放入記憶體中。

參數
  • src (str | airflow.io.path.ObjectStoragePath) – 來源檔案路徑或 ObjectStoragePath 物件。

  • dst (str | airflow.io.path.ObjectStoragePath) – 目的地檔案路徑或 ObjectStoragePath 物件。

  • source_conn_id (str | None) – 可選的來源連線 ID。

  • dest_conn_id (str | None) – 可選的目的地連線 ID。

另請參閱

有關如何使用此運算子的更多資訊,請參閱指南:傳輸檔案

template_fields: collections.abc.Sequence[str] = ('src', 'dst')[原始碼]
execute(context)[原始碼]

在建立運算子時衍生。

Context 是與呈現 jinja 模板時使用的相同字典。

有關更多上下文,請參閱 get_template_context。

get_openlineage_facets_on_start()[原始碼]

此條目是否有幫助?