To Enable Einstein Discovery on Tableau Server We need to enable Extension on Tableau Server . There are few Prerequisites and requirements to enable it. The whole process is described below.
CORS
A prerequisite for this is configuring CORS in Salesforce Org. Here is the process to enable CORS
Sign in to your Salesforce.com developer account, click your user name in the upper-right, and then select Setup.
In the left navigation column, search for "cors" and select CORS .
In CORS, in the Allowed Origins List section, click New.
In CORS Allowed Origin List Edit, enter the URL of your Tableau server, beginning with "https://".
For more information about the URL pattern, see the Salesforce developer documentation: https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/extend_code_cors.htmClick Save.
Reference: https://help.tableau.com/current/server/en-us/config_cors_sfdc.htm
OAUTH
If you are integrating Einstein Discovery extensions with Tableau Server, you need to do this OAuth client ID and secret configuration. The ability to integrate Einstein Discovery and Tableau Server was added in version 2021.1.0
Set up OAuth by following these general steps:
Create a Connected App in Salesforce.
Use the information you obtained in step 1 to configure Tableau Server.
(Optional) Configure site-specific OAuth.
Step 1: Create a Salesforce connected app
Note: This procedure documents the process in Salesforce Lightning. If you are using the traditional interface, the navigation may be different but the configuration is the same.
Sign in to your Salesforce.com developer account, click your user name in the upper-right, and then select Setup.
In the left navigation column, under Apps, select App Manager.
In the Connected Apps section, click New Connected App.
In Basic Information, give the app a name, tab through the api field so it will self-populate in the correct format, and enter a contact email for the app.
In the API [Enable OAuth Settings] section, select Enable OAuth Settings.
In the new OAuth settings that appear, for Callback URL, type the fully qualified domain name of your server, using the https protocol, and append the following text to the URL: auth/add_oauth_token.
For example:
https://www.your_tableau_server.com/auth/add_oauth_tokenMove the following items from Available OAuth Scopes to Selected OAuth Scopes:
Access and manage your data (api)
Access your basic information (id)
Perform requests on your behalf at any time (refresh_token)
Click Save.
After you save the app, Salesforce populates the API section with the following IDs that you will use to configure Tableau Server:
Consumer Key
Consumer Secret
Callback URL
Step 2: Configure Tableau Server for Salesforce.com OAuth
Once your connected app is created in Salesforce and you have the Customer Key, Customer Secret, and the Callback URL, you can configure Tableau Server for Salesforce data connections and outputs, and Einstein Discovery.
On the Tableau Server computer, at a command prompt, run the following commands:
tsm configuration set -k oauth.salesforce.client_id -v <your_customer_key>
tsm configuration set -k oauth.salesforce.client_secret -v <your_customer_secret>
tsm configuration set -k oauth.salesforce.redirect_uri -v <your_redirect_URL>(Optional) To change the default login server, type the following command:
tsm configuration set -k oauth.salesforce.server_base_url -v <URL>Enter the following command to apply changes:
tsm pending-changes apply
If the pending changes require a server restart, the pending-changes apply command will display a prompt to let you know a restart will occur. This prompt displays even if the server is stopped, but in that case there is no restart. You can suppress the prompt using the --ignore-prompt option, but this does not change the restart behavior. If the changes do not require a restart, the changes are applied without a prompt.
Configure custom OAuth for a site
You can configure a custom Salesforce OAuth client for a site.
Consider configuring a custom OAuth client to 1) override an OAuth client if configured for the server or 2) enable support for securely connecting to data that requires unique OAuth clients.
When a custom OAuth client is configured, the site-level configuration takes precedence over any server-side configuration and all new OAuth credentials created use the site-level OAuth client by default. No Tableau Server restart is required for the configurations to take effect.
Important: Existing OAuth credentials established before the custom OAuth client is configured are temporarily usable but both server administrators and users must update their saved credentials to help ensure uninterrupted data access.
Step 1: Prepare the OAuth client ID, client secret, and redirect URL
Before you can configure the custom OAuth client, you need the information listed below. After you have this information prepared, you can register the custom OAuth client for the site.
OAuth client ID and client secret: First register the OAuth client with the data provider (connector) to retrieve the client ID and secret generated for Tableau Server.
Redirect URL: Note the correct redirect URL. You will need this during the registration process in Step 2 below.
https://<your_server_name>.com/auth/add_oauth_token
For example, https://example.com/auth/add_oauth_token
Step 2: Register the OAuth client ID and client secret
Follow the procedure described below to register the custom OAuth client to the site.
Sign in to your Tableau Server site using your admin credentials and navigate to the Settings page.
Under OAuth Clients Registry, click the Add OAuth Client button.
Enter the required information, including the information from Step 1 above:
For Connection Type, select the connector whose custom OAuth client you want to configure.
For Client ID, Client Secret, and Redirect URL, enter the information you prepared in Step 1 above.
Click the Add OAuth Client button to complete the registration process.
(Optional) Repeat step 3 for all supported connectors.
Click the Save button at the bottom or top of the Settings page to save changes.
Step 3: Validate and update saved credentials
To help ensure uninterrupted data access, you (and your site users) must delete the previous saved credentials and add it again to use the custom OAuth client for the site.
Navigate to your My Account Settings page.
Under Saved Credentials for Data Sources, do the following:
Click Delete next to the existing saved credentials for the connector whose custom OAuth client you configured in Step 2 above.
Next to connector name, click Add and follow the prompts to 1) connect to the custom OAuth client configured in Step 2 above and 2) save the latest credentials.
Step 4: Notify users to update their saved credentials
Make sure you notify your site users to update their saved credentials for the connector whose custom OAuth client you configured in Step 2 above. Site users can use the procedure described in Update saved credentials to update their saved credentials.
Enable Analytics Extension
Before you configure extensions, you must enable analytics extensions server-wide.
If you only have a single site (default) on your server, click Settings, and then go to Step 2.
If you have multiple sites on your server:
Under All Sites, click Manage all sites.
Click the Extensions tab.
Scroll to Analytics Extensions, select Enable analytics extensions, and then click Save.
Configure Analytics Extension
On the Settings page, click the Extensions tab and then scroll to Analytics Extensions. (On multi-site deployments of Tableau Server, navigate to the site where you want to configure analytics extensions, and then click Settings>Extensions.)
Multi-site deployments only: you must enable Analytics Extensions on each site. Under Analytics Extensions, select Enable analytics extensions for site.
Under Analytics Extensions, click Create new connection.
In the New Connection dialog, click the connection type you want to add, then enter the configuration settings for your analytics service:
The options you need to configure depend on the connection type you choose:
For an Einstein Discovery connection, click Enable.
For TabPy, RServer and Analytics Extensions API connections, enter the following information:
Connection Name: (Required) Specify the server type you are connecting to. RSERVE supports connections to R using the RServe package. TABPY supports connections to Python using TabPy, or to other analytics extensions.
Require SSL (Recommended): Select this option to encrypt the connection to the analytics service. If you specify a HTTPS URL in the Hostname field, then you must select this option.
Hostname: (Required) Specify the computer name or URL where the analytics service is running. This field is case sensitive.
Port: (Required) Specify the port for the service.
Sign in with a username and password(Recommended): Select this option to specify user name and password that is used to authenticate to the analytics service.
Click Create.
Edit or delete an analytics extension connection
To edit or delete a configuration, navigate to Analytics Extensions on the Extensions tab of your site.
Click the Edit or Delete icon and follow the prompts to change the configuration
Comments
Post a Comment