Starburst Salesforce connector#

The Starburst Salesforce connector allows Starburst Enterprise platform (SEP) to query Salesforce data available in your existing Salesforce account.

Requirements#

To connect to Salesforce, you need:

  • Network access from the coordinator and workers to the Salesforce API endpoints.

  • Security token for your Salesforce account, or configured range of IP addresses for logins.

  • A valid Starburst Enterprise license.

Configuration#

Create the mysalesforce catalog with a catalog properties file in etc/catalog named mysalesforce.properties:

connector.name=salesforce
salesforce.user=mysalesforceaccount@example.com
salesforce.password=secret
salesforce.security-token=<token-from-Salesforce>
salesforce.enable-sandbox=true

Specify the connector.name property as salesforce. Configure the connector using your Salesforce account username, password, and the security token for your account.

The security token is generated by Salesforce and emailed to you. To generate an access token, at the top navigation bar in Salesforce, go to <your name> > My Settings > Personal > Reset My Security Token.

You can use a configured range of IP addresses approved for login as an alternative to the security token. In this case do not specify salesforce.security-token in the catalog file. You must correctly configure the IP range(s) for the coordinator and all worker nodes in Salesforce’s Security Controls > Network Access page for your organization.

You can optionally enable the Salesforce Sandbox as shown in the last line of the preceding example. The default value is false.

The connector can only access Salesforce as the configured user in the catalog. If you need to access Salesforce with a different user name, configure a separate catalog.

General configuration properties#

The following table describes general catalog configuration properties for the connector:

Property name

Description

Default value

case-insensitive-name-matching

Support case insensitive schema and table names.

false

case-insensitive-name-matching.cache-ttl

1m

case-insensitive-name-matching.config-file

Path to a name mapping configuration file in JSON format that allows Trino to disambiguate between schemas and tables with similar names in different cases.

null

case-insensitive-name-matching.refresh-period

Frequency with which Trino checks the name matching configuration file for changes.

0 (refresh disabled)

metadata.cache-ttl

Duration for which metadata, including table and column statistics, is cached.

0 (caching disabled)

metadata.cache-missing

Cache the fact that metadata, including table and column statistics, is not available

false

metadata.cache-maximum-size

Maximum number of objects stored in the metadata cache

10000

write.batch-size

Maximum number of statements in a batched execution. Do not change this setting from the default. Non-default values may negatively impact performance.

1000

join-pushdown.enabled

Enable join pushdown. Equivalent catalog session property is join_pushdown_enabled. Enabling this may negatively impact performance for some queries.

false

Type mapping#

Because SEP and Salesforce each support types that the other does not, the connector modifies some types when reading data.

Salesforce to SEP type mapping#

Salesforce type

SEP type

Auto Number

VARCHAR

Lookup Relationship

VARCHAR

Master-Detail Relationship

VARCHAR

External Lookup Relationship

VARCHAR

Checkbox

VARCHAR

Currency

DOUBLE

Date

DATE

Date/Time

TIMESTAMP

Email

VARCHAR

Geolocation

VARCHAR

Number

DOUBLE

Percent

DOUBLE

Phone per catalog

VARCHAR

Picklist

VARCHAR

Picklist (Multi-Select)

VARCHAR

Text

VARCHAR

Text Area

VARCHAR

Time

TIME

URL

VARCHAR

No other type is supported.

SQL support#

The connector supports globally available and read operation statements to access data and metadata in Salesforce.

Performance#

System information#

The Salesforce connector uses the Salesforce API to access data and metadata. Salesforce limits the number of API calls for organizations. If the limits are reached, query processing fails.

The connector provides API limit and current usage numbers in the limits table in the system schema. You can use this information for monitoring your usage to ensure a limit is not exceeded. The following query returns the data from your mysalesforce catalog:

SELECT * FROM mysalesforce.system.limits;

Dynamic filtering#

Dynamic filtering is enabled by default. This causes the connector to wait for dynamic filtering to complete before starting a query.

You can disable dynamic filtering by setting the property dynamic-filtering.enabled in your catalog properties file to false.

Table scan redirection#

The connector supports table scan redirection to improve performance and reduce load on the data source.

This is particularly recommended for the Salesforce connector as Salesforce has API limits, which can cause queries to fail.