Configure SAP HANA service smart data integration for SAP BTP with the SAP HANA service for SAP BTP
- How to start and register the data provisioning agent with SAP HANA service for SAP BTP in a local computer
- How to configure the file adapter to load text files
- How to create a remote source in SAP HANA service for SAP BTP using the Database Explorer
- You have a productive account in SAP Integration Suite and SAP Extension Suite, a subaccount in SAP Business Technology Platform, Cloud Foundry environment and a space.
- You have created an instance of the SAP HANA service for SAP BTP
- You have access to the database cockpit for your SAP HANA service for SAP BTP database instance.
- You have enabled Data Provisioning Server in your SAP HANA service for SAP BTP during setup or from the cockpit.
- You have administration rights in your local computer.
This tutorial cannot be completed with a trial account.
- Step 1
Navigate into the space in which you are developing in your subaccount.
Service Instancesand click the Dashboard icon for the service of type
Use your email account to login:
If prompted for authorization, click Authorize. Take note of the endpoint
Click the SAP HANA cockpit icon.
Use the user
SYSTEMand the password you set as the database password.
Open the SQL console.
The Database Explorer will automatically open a SQL console connected to your database.
- Step 2
Download the Data Provisioning Agent from the SAP Software Center. Choose
SPS3Patch 52 or higher.
For more information about installing the Data Provisioning Agent for productive environments check the documentation in SAP Help
Choose a directory in your file system and use the following command to extract the file into it.
You can download SAPCAR to extract your file from the SAP Support Portal,sshCopy
sapcar -xvf <<DOWNLOADED FILE>>
The previous command has created a new directory. Navigate into it and execute
Alternatively, you can use
hdbinstfrom a command line.
Go into step 2. Choose an installation path and make a note of it, you will need it later:
Review the options and click Install
Wait until installation finishes and you get confirmation that Installation finished successfully
- Step 3
You will use the command-line tool to configure the data provisioning agent to connect to your SAP HANA instance using a secure JDBC connection.
Open a command line or terminal with administration rights.
For Windows, search for
cmdand use the context menu to choose
Run as Administrator.
Use the following commands to set the environment variables to the installation path you specified in step 2:
Switch to that directory using command
cd. For example:sshCopy
Navigate into the
bindirectory. Execute the configuration script
cd bin agentcli --configAgent
Start with option 2 . Start or Stop Agent and start the agent with option 1 . Start Agent.
b. Back to go back to the main menu. Continue with option 6 . SAP HANA Connection.
Choose option 3 for JDBC.
Choose true for Use Web Socket to connect
###Note: This option is available in the Data Provisioning Agent version 126.96.36.199 or higher.
Get the database ID from the SAP HANA Service Dashboard
/service/and database ID to form the Web Socket URL
Get the endpoint for Web Socket also from the SAP HANA Service Dashboard
And use it to complete the Host and Port
Choose true for
Use encrypted JDBC connection
SYSTEM(or an administration user in a non-trial environment) and its credentials.
Choose an option for the HTTP proxy.
JDCBUSRand a password. Choose true. This user will be created for you.
The configuration agent will connect and create the user. Press Enter when prompted.
Make sure the IP address from which you are connecting the agent is whitelisted.
bto go back to the main menu. Choose option 7. Agent Registration and follow the instructions to register your local computer as an agent.
Finally, register an adapter using option 8.
FileAdapterwhen prompted. Use Quit to exit the configuration agent.
- Step 4
From a command prompt, use the following command to set an access token.shCopy
Enter option 8.
Set a token and make a note of it. This example uses
Press Enter and quit the configuration tool.
- Step 5
Download this sample file into the default workspace.
The default workspace is located in
<<ROOT DIRECTORY>>\workspace, for example,
Create a text file called
salarydata.cfgwith the following content:textCopy
#Configuration file for data load CODEPAGE=UTF-8 ERROR_ON_COLUMNCOUNT=false ESCAPE_CHAR=\ EXPONENTIAL=E FORCE_DIRECTORY_PATTERN=C:\usr\sap\workspace FORCE_FILENAME_PATTERN=salarydata.csv FORMAT=CSV LENIENT=true LOCALE=en_US ROW_DELIMITER=\n SKIP_HEADER_LINES=1 COLUMN=id;INTEGER; COLUMN=salary;INTEGER; COLUMN=start_year;INTEGER; COLUMN=gender;NVARCHAR(256); COLUMN=region;NVARCHAR(256); COLUMN=T-Level;NVARCHAR(256);
Save the configuration file in the same directory.
- Step 6
Go back to the Database Explorer. You will see the adapter under
Catalog -> Data Provisioning Agents
You should see the agent you registered.
Right-click on Remote Sources. Choose Add Remote Source
Call the source
LocalFile. The Source location should automatically choose the agent you registered on step 4.
Set the path to the
workspacedirectory in which you downloaded the
Scroll down to the credentials and choose Technical User as the credentials mode and enter the access token in the
AccessTokenfield. If you used the example token before, enter
Check the remote objects to make sure configuration has been successful and to complete the validation below.
Do you see `salarydata` in the list of remote objects?