Skip to Content
Author's profile photo Tom Flanagan

SAP River: Accessing with Python – Bulk Loading

SAP HANA Academy’s Philip Mugglestone details how to bulk load data into SAP River using Python.

An advantage of loading data with Python is that any validations or specific actions that are set up within a SAP River application will be applied.

Philip suggests first creating a CSV file that contains the data. Then Philip shows how to change the main URL of the SAP River application to quickly see all of the calls that are available. Substituting docs for v1 within the application’s URL shows all of the application’s documentation in a browser.

Philip imports the request package into Python to simplify the code necessary for HTTP requests. He next imports the CSV package, set ups the right of authentication and creates a variable for his CSV file. Philip then creates a loop using HTTP post requests to load data for each instance of an entity (individual rows of a table) to bulk load the data.

Then in the command prompt window Philip verifies that both of his files have loaded by entering C:\Users\Administrators\Documents>dir *.py. He also checks that to see if his CSV file has loaded by entering C:\Users\Administrators\Documents>dir *.csv. Finally Philip enters C:\Users\Administrators\Documents>python HelloWorld(his application name) to bulk load all of his data.

After, Philip checks on a web browser to ensure that his new data has loaded. Bulk loading data through Python in SAP River is a very practical because it empowers a user with the option of simply removing data by using a restart action.

Philip’s informative tutorial video shows how to bulk load data into SAP River using Python.

Screen Shot 2014-02-27 at 7.06.42 AM.png

View other tutorials on SAP River at the SAP HANA Academy.

SAP HANA Academy – over 500 free tutorial technical videos on using SAP HANA.

-Tom Flanagan

SAP HANA Academy

Follow @saphanaacademy

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.