blob: 087a3147b0e962f6ca308d0b760e834b3a37d8a5 [file] [log] [blame]
:py:mod:`airflow.providers.google.cloud.transfers.salesforce_to_gcs`
====================================================================
.. py:module:: airflow.providers.google.cloud.transfers.salesforce_to_gcs
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.google.cloud.transfers.salesforce_to_gcs.SalesforceToGcsOperator
.. py:class:: 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)
Bases: :py:obj:`airflow.models.BaseOperator`
Submits Salesforce query and uploads results to Google Cloud Storage
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:SalesforceToGcsOperator`
:param query: The query to make to Salesforce.
:param bucket_name: The bucket to upload to.
:param object_name: The object name to set when uploading the file.
:param salesforce_conn_id: the name of the connection that has the parameters
we need to connect to Salesforce.
:param include_deleted: True if the query should include deleted records.
:param query_params: Additional optional arguments
:param export_format: Desired format of files to be exported.
:param coerce_to_timestamp: 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
:param record_time_added: 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
:param gzip: Option to compress local file or file data for upload
:param gcp_conn_id: the name of the connection that has the parameters we need to connect to GCS.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['query', 'bucket_name', 'object_name']
.. py:attribute:: template_ext
:annotation: :Sequence[str] = ['.sql']
.. py:attribute:: template_fields_renderers
.. py:method:: execute(context)
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.