airflow.providers.common.io.operators.file_transfer

Module Contents

Classes

FileTransferOperator

Copies a file from a source to a destination.

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

Bases: airflow.models.BaseOperator

Copies a file from a source to a destination.

This streams the file from the source to the destination if required , so it does not need to fit into memory.

Parameters
  • src (str | airflow.io.path.ObjectStoragePath) – The source file path or ObjectStoragePath object.

  • dst (str | airflow.io.path.ObjectStoragePath) – The destination file path or ObjectStoragePath object.

  • source_conn_id (str | None) – The optional source connection id.

  • dest_conn_id (str | None) – The optional destination connection id.

See also

For more information on how to use this operator, take a look at the guide: Transfer a file

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

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

get_openlineage_facets_on_start()[source]

Was this entry helpful?