airflow.providers.salesforce.operators.bulk¶
Classes¶
Execute a Salesforce Bulk API and pushes results to xcom. |
Module Contents¶
- class airflow.providers.salesforce.operators.bulk.SalesforceBulkOperator(*, operation, object_name, payload, external_id_field='Id', batch_size=10000, use_serial=False, salesforce_conn_id='salesforce_default', max_retries=0, bulk_retry_delay=5.0, transient_error_codes=_DEFAULT_TRANSIENT_ERROR_CODES, **kwargs)[source]¶
Bases:
airflow.providers.common.compat.sdk.BaseOperatorExecute a Salesforce Bulk API and pushes results to xcom.
See also
For more information on how to use this operator, take a look at the guide: SalesforceBulkOperator
- Parameters:
operation (Literal['insert', 'update', 'upsert', 'delete', 'hard_delete']) – Bulk operation to be performed Available operations are in [‘insert’, ‘update’, ‘upsert’, ‘delete’, ‘hard_delete’]
object_name (str) – The name of the Salesforce object
payload (list) – list of dict to be passed as a batch
external_id_field (str) – unique identifier field for upsert operations
batch_size (int) – number of records to assign for each batch in the job
use_serial (bool) – Process batches in serial mode
salesforce_conn_id (str) – The Salesforce Connection id.
max_retries (int) – Number of times to re-submit records that failed with a transient error code such as
UNABLE_TO_LOCK_ROWorAPI_TEMPORARILY_UNAVAILABLE. Set to0(the default) to disable automatic retries.bulk_retry_delay (float) – Seconds to wait before each retry attempt within the Bulk API retry loop. Defaults to
5.transient_error_codes (collections.abc.Iterable[str]) – Collection of Salesforce error
statusCodevalues that should trigger a retry. Defaults to{"UNABLE_TO_LOCK_ROW", "API_TEMPORARILY_UNAVAILABLE"}.
- template_fields: collections.abc.Sequence[str] = ('object_name', 'payload', 'external_id_field')[source]¶