astro.files.locations.sftp

Module Contents

Classes

SFTPLocation

Handler SFTP object store operations.

class astro.files.locations.sftp.SFTPLocation(path, conn_id=None, load_options=None)

Bases: astro.files.locations.base.BaseFileLocation

Handler SFTP object store operations. While exporting to SFTP the user should have permission to create the file in the desired location.

Parameters:
property hook: airflow.providers.sftp.hooks.sftp.SFTPHook
Return type:

airflow.providers.sftp.hooks.sftp.SFTPHook

property transport_params: dict

Get SFTP credentials in order to access remote file system

Return type:

dict

property paths: list[str]

Resolve SFTP file paths with prefix

Return type:

list[str]

property size: int

Return file size for SFTP location

Return type:

int

property openlineage_dataset_namespace: str

Returns the open lineage dataset namespace as per https://github.com/OpenLineage/OpenLineage/blob/main/spec/Naming.md

Return type:

str

property openlineage_dataset_name: str

Returns the open lineage dataset name as per https://github.com/OpenLineage/OpenLineage/blob/main/spec/Naming.md

Return type:

str

location_type
supported_conn_type
get_uri()
get_stream()

return the custom SFTP read_buffer context to add file into given path

sftp_stream()

sftp_stream context to export a file to the given location.