Registry / workflow / apache-airflow-providers-salesforce

apache-airflow-providers-salesforce

JSON →
library5.14.2pypypi✓ verified 21d ago

The `apache-airflow-providers-salesforce` package is an Apache Airflow provider that enables seamless interaction with the Salesforce platform. It offers operators, hooks, and sensors to perform various operations such as data extraction, data loading, and executing Salesforce API calls directly from Airflow Directed Acyclic Graphs (DAGs). The current version is 5.14.0, and the package maintains an active development cycle with frequent monthly or bi-monthly releases to introduce new features, improvements, and bug fixes.

pip install apache-airflow-providers-salesforce
INSTALL
IMPORT
SIG · APACHE-AIRFLOW-PRO
A
apache-airflow-providers-salesforce
workflowpythonv5.14.2
Install
31.2s avg
Import
5526ms
Disk
417MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.14.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 5.702s · 416MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 31.2s · import 5.350s · 406MB
417MB installed
● package 417MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SalesforceHook
from airflow.providers.salesforce.hooks.salesforce import SalesforceHook
SalesforceToTableOperator
from airflow.providers.salesforce.operators.salesforce import SalesforceToTableOperator
SalesforceBulkOperator
from airflow.providers.salesforce.operators.bulk import SalesforceBulkOperator

This quickstart demonstrates a basic Airflow DAG using the `SalesforceToTableOperator` to extract data from Salesforce and shows how `SalesforceHook` can be used directly for more custom interactions. Before running, configure a Salesforce connection in the Airflow UI with `Conn Id: salesforce_default` and provide necessary credentials (username, password, security token, login URL).

import os from datetime import datetime from airflow.models.dag import DAG from airflow.providers.salesforce.hooks.salesforce import SalesforceHook from airflow.providers.salesforce.operators.salesforce import SalesforceToTableOperator with DAG( dag_id='salesforce_example_dag', start_date=datetime(2023, 1, 1), schedule_interval=None, catchup=False, tags=['salesforce', 'example'], ) as dag: # Example of using SalesforceToTableOperator to extract data extract_contacts = SalesforceToTableOperator( task_id='extract_salesforce_contacts', salesforce_conn_id='salesforce_default', # Ensure this connection is configured in Airflow UI sobjects=['Contact'], table_name='airflow_contacts', selected_fields=['Id', 'FirstName', 'LastName', 'Email'], where_clause="MailingState = 'CA'", # Optional: You might push to a database table or another destination # E.g., postgres_conn_id='postgres_default' # For this example, we'll just demonstrate extraction. ) # Example of using SalesforceHook directly (e.g., in a PythonOperator) def get_salesforce_data(**kwargs): hook = SalesforceHook(salesforce_conn_id='salesforce_default') sf_client = hook.get_conn() # Query the Salesforce API directly records = sf_client.query("SELECT Id, Name FROM Account LIMIT 5") print(f"Fetched {len(records['records'])} Account records.") return records['records'] # You'd typically use a PythonOperator to wrap the hook usage # from airflow.operators.python import PythonOperator # fetch_data_task = PythonOperator( # task_id='fetch_data_with_hook', # python_callable=get_salesforce_data, # ) # extract_contacts >> fetch_data_task
airflow --version
Debug
Known issues
breakingThe `[tableau]` extra has been removed since provider version 5.0.0. Installing `apache-airflow-providers-salesforce[tableau]` will no longer work for Tableau integration.
fix
To use Tableau integration, install `apache-airflow-providers-tableau` as a separate provider package: `pip install apache-airflow-providers-tableau`.
affects: >=5.0.0
breakingMinimum Apache Airflow version requirements have increased over time. For provider version 5.13.0 and newer, `apache-airflow >=2.11.0` is required. Older provider versions required `2.1.0+` or `2.2+`. Installing this provider with an older Airflow version might trigger an automatic Airflow upgrade.
fix
Ensure your Airflow environment meets the minimum version requirement (`apache-airflow >=2.11.0`) before installing this provider. If you're on an older Airflow, upgrade Airflow first and then run `airflow upgrade db` if prompted after automatic upgrade.
affects: >=5.0.0
gotchaSalesforce API calls are subject to rate limits. Frequent or large data operations without proper throttling or batching can lead to API limits being hit, causing task failures.
fix
Design your DAGs to respect Salesforce API limits. Utilize batch operations where possible (e.g., `SalesforceBulkOperator`), implement retries with exponential backoff, and consider staggering heavy operations.
affects: All
gotchaAll Salesforce operations require a configured Airflow connection. Incorrect connection details (e.g., wrong username, password, security token, or login URL) will lead to authentication failures.
fix
Before using any Salesforce operator or hook, configure a Salesforce connection in the Airflow UI (Admin -> Connections). Ensure all required fields (Host, Login, Password, Security Token) are correctly populated. The security token is especially critical if your IP address is not whitelisted by Salesforce.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'airflow.providers.salesforce'
The 'apache-airflow-providers-salesforce' package is not installed or not accessible in the Python environment.
fix
Install the package using pip: 'pip install apache-airflow-providers-salesforce'.
ImportError: cannot import name 'SalesforceHook' from 'airflow.providers.salesforce.hooks.salesforce'
The 'SalesforceHook' class has been moved or renamed in the 'apache-airflow-providers-salesforce' package.
fix
Update the import statement to: 'from airflow.providers.salesforce.hooks.salesforce import SalesforceHook'.
AttributeError: module 'airflow.providers.salesforce.hooks.salesforce' has no attribute 'SalesforceHook'
The 'SalesforceHook' class is not present in the specified module, possibly due to version changes or incorrect import paths.
fix
Ensure you are using the correct import path: 'from airflow.providers.salesforce.hooks.salesforce import SalesforceHook'.
Broken DAG: No module named 'airflow.providers.salesforce'
The 'apache-airflow-providers-salesforce' package is missing, leading to DAG import failures.
fix
Install the package using pip: 'pip install apache-airflow-providers-salesforce'.
ImportError: cannot import name 'SalesforceToS3Operator' from 'airflow.providers.salesforce.transfers.salesforce_to_s3'
The 'SalesforceToS3Operator' class has been moved or renamed in the 'apache-airflow-providers-salesforce' package.
fix
Update the import statement to: 'from airflow.providers.salesforce.transfers.salesforce_to_s3 import SalesforceToS3Operator'.
Upgrade
Version history
5.14.2latest on PyPI · released Aug 8, 2026
Audit
Dependencies
apache-airflowrequiredCore Apache Airflow library; required for running Airflow DAGs and using providers. Minimum version >=2.11.0 is required for provider version 5.13.0+.
simple-salesforcerequiredPython client for the Salesforce API.
pandasrequiredUsed for data manipulation and handling dataframes, particularly in operators that involve data transfer (e.g., to/from tables). Version requirements vary by Python version.
apache-airflow-providers-common-compatrequiredProvides compatibility layers for common Airflow features across different provider versions.
apache-airflow-providers-tableauoptionalRequired for Tableau integration, which was previously an 'extra' of this provider but is now a separate provider package.
Agent activity
66 hits · last 30 days
node
56
OpenAI (training)
1
Resources
apache-airflow-providers-salesforce — pip install apache-airflow-providers-salesforce · libregistry