airflow.hooks.filesystem

Module Contents

Classes

FSHook

Allows for interaction with an file server.

class airflow.hooks.filesystem.FSHook(fs_conn_id=default_conn_name, **kwargs)[source]

Bases: airflow.hooks.base.BaseHook

Allows for interaction with an file server.

Connection should have a name and a path specified under extra:

example: Connection Id: fs_test Connection Type: File (path) Host, Schema, Login, Password, Port: empty Extra: {“path”: “/tmp”}

conn_name_attr = 'fs_conn_id'[source]
default_conn_name = 'fs_default'[source]
conn_type = 'fs'[source]
hook_name = 'File (path)'[source]
classmethod get_connection_form_widgets()[source]

Return connection widgets to add to connection form.

classmethod get_ui_field_behaviour()[source]

Return custom field behaviour.

get_conn()[source]

Return connection for the hook.

get_path()[source]

Get the path to the filesystem location.

Returns

the path.

Return type

str

test_connection()[source]

Test File connection.

Was this entry helpful?