Applies from release 2020.4
Alation has certified the Salesforce DB with the following driver to accommodate additional features with the latest version of Salesforce API.
Alation will provide the above mentioned CData driver for Salesforce.
Scope of Support¶
Supported as Custom DB with the CData Driver
Metadata Extraction (MDE)
Sampling and Profiling
Port 443 must be open.
JDBC driver used to connect to the database: CData JDBC Driver for Salesforce
JDBC URI for the Salesforce data source
OAuth Client ID
OAuth Client Secret
OAuth Access Token
RTK - Use the RTK parameter only if you have the RTK provided by Alation.
Service Account - Username and Password
Construct the URI¶
Perform the following steps to generate OAuth Client ID and OAuth Client Secret:
Log in to Salesforce and create a User ID and Password. Refer to Usernames and Passwords.
Generate the OAuth Client ID/Consumer Key and OAuth Client Secret/Consumer Secret:
Create an app, refer to Create a Connected App.
Go to Apps > App Manager. Click the dropdown icon of the created app and select View.
Copy the OAuth Client ID/Consumer Key and OAuth Client Secret/Consumer Secret.
Get the Security Token. Refer to Security Token. Security Token must be provided in the General Settings > Network Connection > Properties field, if the IP is not set as Trusted IP.
JDBC URI Format¶
Use the following format of the JDBC URI if you are not using an OAuth Connection:
JDBC URI for OAuth Connection¶
Use the following format of the JDBC URI if OAuth connection is used:
After you have successfully added the source, you will need to connect to it in Compose, obtain the OAuth Access Token and update the URI on the Data Source Settings > General Settings page. This is described in the sections below.
Add the CData to Alation¶
Set Trusted IP¶
Before setting up the datasource connection in Alation, make sure that the IP of the Alation instance is set as a trusted IP in Salesforce. Refer to Set Trusted IP.
Steps in Alation¶
Step 1: Add a Data Source¶
Add a new Data Source on the Sources page.
Step 2: Set up the Connection¶
On the Add a Data Source screen of the wizard, specify:
Database Type: Custom DB
JDBC URI: Provide any valid URI with port number 443. This is only a temporary URI to move through the Add Data Source wizard.
The correct JDBC URI must be provided on the General Settings tab of the data source Settings page.
Select Driver: select the JDBC driver for Salesforce from the Select Driver drop-down list:
Do not select the Use Kerberos checkbox.
Click Save and Continue. The next wizard screen Set Up a Service Account will open.
Step 3: Enter Service Account Credentials¶
Select the Yes radio button.
Provide the Username and Password of the service account created for Alation.
Click Save and Continue. The next wizard screen Configure Your Data Source will open.
Step 4: Configure Your Data Source¶
Click Skip this Step. After this step, you are navigated to the Settings page of your data source.
Step 5: General Settings¶
On the General Settings section, change the temporary URI to the correct URI as explained in the Construct the URI section. Provide the Security Token in the Properties fields if the IP is not set as Trusted IP, refer to Set Trusted IP.
Click the Test button to test the connection.
If you are using an OAuth connection, perform the following:
Go to Compose and connect to your Salesforce source using the User ID and Password.
Click the plus icon and provide the URI using the format described in the JDBC URI for OAuth Connection section. Click Add & Use.
Run the following query in Compose. As “<call_back_url>”, provide the callback URL that was provided during the OAuth App creation:
Copy the URL and run it in a new browser. You will see an error message as shown below and a code in the URL. Copy the code and decode it using an URL decoder.
Copy the decoded code and add it as a value to the Verifier parameter in the below query.EXEC GetOAuthAccessToken @Verifier=<Code_Copied_from_URL>
Example:EXEC GetOAuthAccessToken @Verifier=32217c96149fda1e96
This should return the OAuth Access Token as result.
Copy the OAuth Access Token.
Go to the Settings > General Settings page and edit the connection URI: specify the URI in the correct format and add the OAuth Access Token (refer to the JDBC URI for OAuth Connection section).
InitiateOAuth parameter must be set to Refresh while adding the generated OAuthAccessToken to the URI.
Save the change. After providing the URI in the required format, you can configure and perform metadata extraction.
Configure and perform metadata extraction and verify the results:
In Settings > Custom Settings, you can set the Catalog Object Definition to Schema.Table to remove any driver-imposed prefixes from the metadata object names
Automatic full and selective MDE is supported
Sampling and Profiling¶
Configure and perform Sampling and Profiling :
Users can run a sample for an individual table on the Samples tab of the Table Catalog page or profile an individual column on the Overview tab of the Column page.
Automatic full and selective Profiling is supported.
Use the Per-Object Parameters in Settings tab to specify which objects to profile.
Custom query-based Sampling is supported. Custom Query-Based Sampling allows you to provide a custom query for profiling each specific table.
Deep Column Profiling (Profiling V2 ) is supported.
Query Log Ingestion¶
You can optionally use Compose with the Salesforce Custom DB data source. Use the Schema.Table format for writing queries.
Logs to collect/review:
For logs related to MDE: taskserver.log, taskserver_err.log.
For logs related to Compose: connector.log, connector_err.log.
For any other errors: alation-error.log, alation-debug.log
During Metadata Extraction from a Salesforce Sandbox data source, if the Error serializing table objects: null or Error serializing table objects: Error iterating schema children is displayed:
Append the parameter UseSandbox=true to the URI. Failed test result for the Network Connection is expected.