Monday, 15 October 2018

Configuring DP Agent and Remote Source in HANA to read Flat Files Part-1

Setting up DP Agent and Remote Source in HANA


1. Download DPAGENT from SAP Service Marketplace as a SAR file

Extract the SAR file using the following command

SAPCAR -xvf  IMDB_DPAGENT200_03P_20-70002517.SAR

Note: DP Agent version has to match the Hana version. Which version to use is best found out by looking at the PAM for Hana SDI

2. Install DPAgent

Installation Path -> C:\usr\sap\dataprovagent

3. For on-premise assign the following privileges to the user

Assign following privilege

◈ System privilege: AGENT ADMIN
◈ System privilege: ADAPTER ADMIN

For Cloud assign following privileges for the user

Application privilege:

sap.hana.im.dp.admin::Administrator

○ System privilege:

AGENT ADMIN , ADAPTER ADMIN  ,USER ADMIN

○ Object privilege:

EXECUTE on GRANT_APPLICATION_PRIVILEGE

HANA on Cloud

○ Application privilege: sap.hana.im.dp.proxy::AgentMessaging

4. DP Service should be up and running in HANA system. Please confirm this before proceeding to next step

5. Launch DP Agent on your client

Click on Register Agent and given Agent Name.

Click on Connect to HANA  -> Provide your HANA System Details

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

6. Register FileAdapter with HANA

Select FileAdapter and click on Register Adapter

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

Once you register File Adapter in DP Agent , you can check in HANA under SYS->VIEWS->ADAPTER whether an entry is created

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

7. Tell the DP Agent the location of the folder in which the files to be accessed via Remote Source are saved. For that do the following in preferences of DP Agent.

Go to DPAgent -> Configure menu ->Preferences -> Adapters-> FileAdapter

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

Create a Access Token password . (Need to give this while creating Remote source in HANA)

8. Build the configuration file for the source file. We have to build a configuration file of the text file which we want to access

via Remote Data Source. Use inbuilt agentutils application

C:\usr\sap\dataprovagent\agentutils

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

9. Find the SID – owner of the machine where the file is stored (need to provide this while creating Remote source in HANA)

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

10. Come back to HANA and Create a Remote Source

Provisioning -> Remote Sources -> Create New Remote Source.  (the user must have the privileges mentioned initially)

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

Enter the Access TokenEntry what you created earlier in preferences of DP Agent

11. We can verify the connection is established successfully by going to

Provisioning -> FlatFile . We can see the file that we want to replicate along with other metadata files.

SAP HANA Tutorial and Materials, SAP HANA Guides, SAP HANA Learning, SAP HANA Study Materials

So ,now we are able to configure DP Agent and enable a connection to Flat File Remote Source.