Salesforce to Amazon S3 Transfer Operator

Use the SalesforceToS3Operator to execute a Salesforce query to fetch data and upload to an Amazon S3 bucket.

Prerequisite Tasks

To use these operators, you must do a few things:

Extract Account data from Salesforce

The following example demonstrates a use case of extracting account data from a Salesforce instance and upload to an Amazon S3 bucket.

airflow/providers/amazon/aws/example_dags/example_salesforce_to_s3.py[source]

upload_salesforce_data_to_s3 = SalesforceToS3Operator(
    task_id="upload_salesforce_to_s3",
    salesforce_query="SELECT AccountNumber, Name FROM Account",
    s3_bucket_name=S3_BUCKET_NAME,
    s3_key=S3_KEY,
    salesforce_conn_id="salesforce",
    replace=True,
)

Was this entry helpful?