Salesforce Source Plugin
Latest: v3.0.10
The CloudQuery Salesforce plugin extracts information from your Salesforce organization(s) and loads it into any supported CloudQuery destination (e.g. PostgreSQL, BigQuery, Snowflake, and more).
Authentication
You will need to create a Salesforce Connected App. This is a Salesforce app that will be used to authenticate with Salesforce. You can create a Connected App in the Salesforce Setup UI. Checkout the Salesforce documentation (opens in a new tab) for more information. Or check out our latest guide to set up a connected app.
Configuration
This example syncs from Salesforce to a Postgres destination:
kind: source
spec:
name: slack
path: cloudquery/salesforce
version: "v3.0.10"
tables: ["*"]
destinations: ["postgresql"]
# Salesforce specific configuration
spec:
client_id: "${SF_CLIENT_ID}"
client_secret: "${SF_CLIENT_SECRET}"
username: "${SF_USERNAME}"
password: "${SF_PASSWORD}"
It assumes that the SF_CLIENT_ID
, SF_CLIENT_SECRET
, SF_USERNAME
and SF_PASSWORD
environment variables are set.
Make sure you use environment variable expansion in production instead of committing the credentials to the configuration file directly.
Salesforce Spec
This is the (nested) spec used by the Slack source plugin.
-
client_id
(string, required):This is the consumer key of the connected app. This can be obtained by Creating a Salesforce connected app.
-
client_secret
(string, required):This is the consumer secreted of the connected app. This can be obtained by Creating a Salesforce connected app.
-
username
(string, required):This is the username of the Salesforce user that will be used to authenticate with Salesforce. This user must have the permissions to access the Salesforce objects you want to sync. It is best to limit the permission of this user to read only.
-
password
(string, required):This is the password of the above Salesforce user.
-
include_objects
(string array, optional):By default the plugin will sync all Salesforce objects. If you want to limit the objects that are synced you can specify the objects you want to sync in this array.
-
exclude_objects
(string array, optional):By default the plugin will sync all Salesforce objects. If you want to exclude some objects from being synced you can specify the objects you want to exclude in this array.
-
concurrency
(int, optional, default: 10000): A best effort maximum number of Go routines to use. Lower this number to reduce memory usage.
Example Queries
List all Salesforce objects
select distinct(object_type) from salesforce_objects;
List all Accounts
select * from salesforce_objects where object_type = 'Account';