SalesforceToGcsOperator(*, query: str, bucket_name: str, object_name: str, salesforce_conn_id: str, include_deleted: bool = False, query_params: Optional[dict] = None, export_format: str = 'csv', coerce_to_timestamp: bool = False, record_time_added: bool = False, gzip: bool = False, gcp_conn_id: str = 'google_cloud_default', **kwargs)¶
Submits Salesforce query and uploads results to Google Cloud Storage
For more information on how to use this operator, take a look at the guide: SalesforceToGcsOperator
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) -- 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= ['query', 'bucket_name', 'object_name']¶
execute(self, context: Dict)¶