Access Salesforce custom objects from HANA Cloud via SDI
# I’ve published the same contents in Japanese on this blog post before.
My team did an evaluation test to connect Salesforce custom objects to SAP HANA Cloud using Smart Data Integration (SDI).
I would like to share how to connect Salesforce and SAP HANA Cloud via SAP HANA Provisioning Agent(DP Agent) on this blog post.
We used an adapter developed by ADVANTCO for connection with Salesforce.
We would like to express our deepest gratitude for the cooperation of ADVANTCO.
I’m going to explain how to connect in the following sections.
- Install DP Agent and configure SAP HANA Cloud connection
- Deploy and register the adapter for Salesforce
- Add remote source to SAP HANA Cloud
Prepare following environments in advance.
- SAP HANA Cloud
- An operating system which DP Agent will be installed (Linux / Windows)
We used Windows server this time.
Now, let’s get started!
1.Install DP Agent and configure SAP HANA Cloud connection
Install DP Agent by referring to the SAP Help Portal about SAP HANA Cloud.
- Create a HANA user to connect to SAP HANA Cloud from DP Agent. Open SAP HANA Cockpit and create a user with following privileges.
System Privilege AGENT ADMIN, ADAPTER ADMIN
- In order to avoid Windows environment specific issue that DP Agent could not start after Installation because of lacking a DDL file, Install x64 Visual C++ Redistributable Package to avoid DP Agent start failure if necessary.
- Configure DP Agent after installation is completed. Go to the installation directory and run agentcli.bat in a command prompt.
cd C:\usr\sap\dataprovagent\bin agentcli.bat --configAgent
- Select Option 2(Start or Stop Agent), then Option 1(Start), and start the Agent.
- When the agent has started, return this top menu screen back again, select Option 6(SAP HANA Connection) and then Option1(Connect to SAP HANA Cloud via JDBC).
- Input following parameters about the connection to SAP HANA Cloud. (Please input information of your own environment.)
Use encrypted JDBC connection True Host Name
Host name of the endpoint of SAP HANA Cloud Instance
*You can see it on SAP HANA Cockpit.
Port number of the endpoint of SAP HANA Cloud Instance
*You can see it on SAP HANA Cockpit.
Agent Admin HANA User HANA user name which is created in step 1 Agent Admin HANA User Password Password of HANA user name which is created in step 1 Use Proxy Server false HANA User Name for Agent Messaging
(When new registration) Any user name
(When using an existing account) existing user name to use
HANA User Password for Agent Messaging
(When new registration) Any password
(When using an existing account) password for an existing user to use
Do you want to create a new SAP HANA user … true
When you want to create an account to communicate to the agent, put true.
If you use an existing user, please set false.
- When you’ve completed the connection settings, Return the top screen of DPAgent Configuration Tool back and select Option7 and then Option1 (Register Agent).
- Register the agent with any name. (We set ‘dpagent_172’.)
Here, we completed the DP agent registration and connection settings to SAP HANA Cloud.
These work in this section allow us to establish a JDBC connection from DP Agent to SAP HANA Cloud.
In the next section, we’ll register an adapter for Salesforce on our DP agent to allow SAP HANA Cloud to connect to Salesforce.
2. Deploy and register the adapter for Salesforce
Deploy and register an adapter developed by ADVANTCO.
In this evaluation test, we’ve got the trial product and license key from ADVANTCO directly.
- Obtain the adapter for Salesforce(Jar file) from ADVANTCO and upload it to the server where the DP agent is installed.
- Open DPAgent Configuration Tool as in step 1.3.
- Select Option9(Custom Adapters) and then Option2(Deploy Custom Adapter).
- Input the adapter(jar file) uploaded in step2.1 as an absolute path
- After successfully deployed the adapter, return back to the top screen of the DPAgent Configuration Tool. And select Option8 (Adapter Registration), and then Option2 (Register Adapter).
- Input ’AdvantcoSFDCAdapter’ to adapter name.
- Open another command prompt, and run DPAgent Adapters Configuration Tool by following command.
Please note the parameter. It is NOT the same parameter as the one we used for starting the DPAgent Configuration Tool in previous steps.
cd C:\usr\sap\dataprovagent\bin agentcli.bat --configAdapters
- Select Option2(Set Adapter Preferences) and then Option28(Set AdvantcoSFDCAdapter preferences)
- Enter the license key by Copy and Paste.
- After registering license, enter the HANA user and it’s password for monitoring SAP HANA Cloud.
If you want to use a function Real-time change data capture(CDC), This user settings is essential, but the details of this settings is left out in this blog post.
Now we completed the deployment and registration of the adapter.
3. Add remote source to SAP HANA Cloud
In this section, I will add Salesforce as a remote source to HANA Cloud and query custom object of Salesforce from HANA Cloud.
- Open HANA Database Explorer, right click ‘Remote Source’ and click ‘Add Remote Source’.
- Input parameters for connection to Salesforce.
There are wide variety of parameters, so here I will focus on the main ones.
Source Name Remote source name of Salesforce on SAP HANA Cloud
Input any name
Adapter Name AdvantcoSFDCAdapter Source Location the DP agent name registered in step 1.8 Login Authentication Endpoint Login server URL to send authentication request. User Name User name of Salesforce Password Password for the user of Salesforce Security Token Consumer security key which Salesforce generated.
Ask your salesforce application administrator to generate it.
Read Timeout Period of time, in seconds, that adapter waits for the reply when read data from Salesforce. Connection Timeout Period of time, in seconds, that adapter waits for the connection reply from Salesforce when making the initial connection.
- After adding remote source, you can see the remote objects on HANA Database Explorer.
- Define a remote object as a virtual table since SAP HANA Cloud cannot access a remote object directly.
- Execute a select query against the defined virtual table, and you can see what data came from Salesforce on SAP HANA Cloud.
We’ve gotten access Salesforce custom objects from SAP HANA Cloud!
I shared how to connect Salesforce custom object and SAP HANA Cloud in this blog post.
According to the ADVANTCO’s official guide, it seems that adapter also supports real time data replication by additional configuration.
I hope this blog post will help those who are interested in data integration between Salesforce and SAP HANA Cloud.