Module Contents



Synchronizes a Azure FileShare directory content (excluding subdirectories),

class*, share_name, dest_gcs, directory_name=None, prefix='', azure_fileshare_conn_id='azure_fileshare_default', gcp_conn_id='google_cloud_default', delegate_to=None, replace=False, gzip=False, google_impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Synchronizes a Azure FileShare directory content (excluding subdirectories), possibly filtered by a prefix, with a Google Cloud Storage destination path.

  • share_name (str) -- The Azure FileShare share where to find the objects. (templated)

  • directory_name (Optional[str]) -- (Optional) Path to Azure FileShare directory which content is to be transferred. Defaults to root directory (templated)

  • prefix (str) -- Prefix string which filters objects whose name begin with such prefix. (templated)

  • azure_fileshare_conn_id (str) -- The source WASB connection

  • gcp_conn_id (str) -- (Optional) The connection ID used to connect to Google Cloud.

  • dest_gcs (str) -- The destination Google Cloud Storage bucket and prefix where you want to store the files. (templated)

  • delegate_to (Optional[str]) -- Google account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • replace (bool) -- Whether you want to replace existing destination files or not.

  • gzip (bool) -- Option to compress file for upload

  • google_impersonation_chain (Optional[Union[str, Sequence[str]]]) -- Optional Google service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

Note that share_name, directory_name, prefix, delimiter and dest_gcs are templated, so you can use variables in them if you wish.

template_fields :Sequence[str] = ['share_name', 'directory_name', 'prefix', 'dest_gcs'][source]
execute(self, context)[source]

This is the main method to derive when creating an operator. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?