airflow.providers.google.cloud.transfers.salesforce_to_gcs

Module Contents

Classes

SalesforceToGcsOperator

Submits Salesforce query and uploads results to Google Cloud Storage.

class airflow.providers.google.cloud.transfers.salesforce_to_gcs.SalesforceToGcsOperator(*, query, bucket_name, object_name, salesforce_conn_id, include_deleted=False, query_params=None, export_format='csv', coerce_to_timestamp=False, record_time_added=False, gzip=False, gcp_conn_id='google_cloud_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Submits Salesforce query and uploads results to Google Cloud Storage.

See also

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

Parameters
  • query (str) – The query to make to Salesforce.

  • bucket_name (str) – The bucket to upload to.

  • object_name (str) – The object name to set when uploading the file.

  • salesforce_conn_id (str) – the name of the connection that has the parameters we need to connect to Salesforce.

  • include_deleted (bool) – True if the query should include deleted records.

  • query_params (dict | None) – Additional optional arguments

  • export_format (str) – Desired format of files to be exported.

  • coerce_to_timestamp (bool) – True if you want all datetime fields to be converted into Unix timestamps. False if you want them to be left in the same format as they were in Salesforce. Leaving the value as False will result in datetimes being strings. Default: False

  • record_time_added (bool) – True if you want to add a Unix timestamp field to the resulting data that marks when the data was fetched from Salesforce. Default: False

  • gzip (bool) – Option to compress local file or file data for upload

  • gcp_conn_id (str) – the name of the connection that has the parameters we need to connect to GCS.

template_fields: collections.abc.Sequence[str] = ('query', 'bucket_name', 'object_name')[source]
template_ext: collections.abc.Sequence[str] = ('.sql',)[source]
template_fields_renderers[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.

Was this entry helpful?