USER MANUALS

Salesforce Data Sources

This section describes the parameters of the statement CREATE DATASOURCE SALESFORCE. We recommend creating Salesforce data sources and base views from Design Studio because it is much easier.

To define a Salesforce data source, it is necessary to specify the following parameters:

  • OR REPLACE: If present and a Salesforce data source with the same name exists, the current definition is substituted with the new one.

  • FOLDER: Folder where the data source will be stored.

  • BASE_URL: URL of the Salesforce instance assigned.

  • API_VERSION: Version of the Salesforce API to consume: v40.0, v41.0…

  • API_CONFIGURATION: Configuration related to the type of API to use. These values are used as the default values for those Salesforce wrappers with DEFAULT defined in their API_CONFIGURATION section.

    • TYPE: whether the API is REST or BULK.

    • CHUNK_SIZE: PK-Chunking size in case that the Salesforce entity admits chunking. 0 value implies not using chunking.

  • INCLUDE_ALL: If TRUE, the queries to this data source will include deleted and archived data. By default, Salesforce filters out deleted and archived data.

  • AUTHENTICATION OAUTH20: Authentication data. The only authentication method supported is OAuth 2.0.

    • ACCESSTOKEN: OAuth 2.0 access token obtained when authenticating with Salesforce. Only mandatory for when AUTHENTICATION_GRANT is CODE_GRANT (web server flow).

    • AUTHENTICATION_GRANT: The possible values are CODE_GRANT or PASSWORD_GRANT.

      Only enter the following parameters if AUTHENTICATION_GRANT value is PASSWORD_GRANT:

      • USER_IDENTIFIER: Salesforce user name.

      • USER_PASSWORD: Salesforce user password.

      • USER_PASSWORD_TOKEN: Security token generated by Salesforce.

    • TOKENENDPOINTURL: URL of the OAuth 2.0 token endpoint.

    • CLIENTIDENTIFIER: Client identifier.

    • CLIENTSECRET: Client secret.

    • REFRESHTOKEN: OAuth 2.0 refresh token obtained when authenticating with Salesforce.

    • TWO_WAY_SSL: Mutual authentication configuration:

      • CERTIFICATE: Base64 representation of the client certificate file.

      • CERTIFICATE_PASSWORD: Certificate paraphrase if it is encrypted.

  • PROXY: If the HTTP requests are sent through a proxy, you have three options:

    • DEFAULT: the data source will use the default HTTP proxy configuration of the Server. See the section Default Configuration of HTTP Proxy of the Administration Guide to learn how to configure these default values.

    • ON: the data source will connect to the proxy specified by the parameters HOST and PORT. If the proxy requires authentication, you also have to provide the credentials of the proxy.

    • AUTOMATIC: provide the URL of a proxy.pac file that contains the configuration parameters of the proxy.

Syntax of the CREATE DATASOURCE SALESFORCE statement
CREATE [ OR REPLACE ] DATASOURCE SALESFORCE <name:identifier>
 [ FOLDER = <literal> ]
 BASE_URL = <literal>
 API_VERSION = <literal>
 [<api_configuration>]
 [ INCLUDE_ALL = { TRUE | FALSE } ]
 <authentication>
 [ <proxy> ]
 [ DESCRIPTION = <literal> ]
 [ <sourceconfiguration> ]

<api_configuration> ::=
  API_CONFIGURATION (
     [ TYPE = { REST | BULK } ]
     [ CHUNK_SIZE = { <integer> } ]
  )

<authentication> ::=
  AUTHENTICATION {
    OAUTH20 (
      ACCESSTOKEN = <token:literal> [ ENCRYPTED ]
      AUTHENTICATION_GRANT = {
         CODE_GRANT
       | PASSOWORD_GRANT (
           USER_IDENTIFIER = <literal>
           USER_PASSWORD = <literal> [ ENCRYPTED ]
           [ USER_PASSWORD_TOKEN = <literal> [ ENCRYPTED ] ]
         )
       }
      [
        [ TOKENENDPOINTURL = <literal> ]
        CLIENTIDENTIFIER = <literal>
        CLIENTSECRET = <literal> [ ENCRYPTED ]
        [ REFRESHTOKEN = { <token:literal> [ ENCRYPTED ] | VARIABLE <name of the variable:literal> } ]
      [
        AUTHORIZATIONSERVERURL = <literal>
        [ REDIRECTIONENDPOINTURL { DEFAULT | <literal> } ]
      ]
      [
        TWO_WAY_SSL (
          CERTIFICATE = <literal> [ ENCRYPTED ]
          [ CERTIFICATE_PASSWORD = <literal> [ ENCRYPTED ] ]
        )
      ]
    )
  }

<proxy> ::=
  PROXY {
      OFF
    | DEFAULT
    | ON ( HOST <literal> PORT <integer> [ <credentials> ] )
    | AUTOMATIC ( PACURI <literal> )
  }

<credentials> ::= USER <literal> PASSWORD <literal> [ ENCRYPTED ]

<sourceconfiguration> ::= SOURCECONFIGURATION ( [ <source configuration property>  [, <source configuration property> ]* ] )

<source configuration property> ::=
  DELEGATEFETCH = <property value>
  | DELEGATEGROUPBY = <property value>
  | DELEGATEOFFSET = <property value>
  | DELEGATEAGGREGATEFUNCTIONSLIST = { DEFAULT | ( <function:identifier> [, <function:identifier> ]* ] ) }
  | DELEGATEOPERATORSLIST = { DEFAULT | ( <operator:identifier> [, <operator:identifier> ]* ] ) }
  | SUPPORTSAGGREGATEFUNCTIONSOPTIONS = <property value>

<property value> ::= true | false  | DEFAULT

If there is already a data source with the same name and the OR REPLACE clause is present, the existing data source definition is replaced by the new one.

To modify an existing Salesforce data source, use the ALTER DATASOURCE SALESFORCE statement.

Syntax of the ALTER DATASOURCE SALESFORCE statement
ALTER DATASOURCE SALESFORCE <name:identifier>
 [ BASE_URL = <literal> ]
 [ API_VERSION = <literal> ]
 [ <api_configuration> ]
 [ INCLUDE_ALL = { TRUE | FALSE } ]
 [ <authentication> ]
 [ <proxy> ]
 [ DESCRIPTION = <literal> ]
 [ <sourceconfiguration> ]

<api_configuration> ::= (see CREATE DATASOURCE SALESFORCE for details)
<authentication> ::= (see CREATE DATASOURCE SALESFORCE for details)
<proxy> ::= (see CREATE DATASOURCE SALESFORCE for details)
<sourceconfiguration> ::= (see CREATE DATASOURCE SALESFORCE for details)
Add feedback