Uploading .csv and xlsx files on HCP Trial – Part 1
Recently, I needed to upload excel files on HANA but not via the navigation.
Because what I wanted, was to find an automated way to upload multiple files at once.
After lots of searching I figured out that uploading .csv and .xlsx files on HANA through an SQL command required to have access at the HANA Server, which is impossible because I was working with the HCP Trial.
So I had to find a way to do it; And this is what I did.
1) Create an HCP Trial account from SAP HANA Cloud Platform Cockpit and create a new HANA Instance with a name of your choice (mine is called hanaxs)
When the process is finished you should be able to see this screen (November 2015)
2) Then I connected to the HCP through a tunnel using the Web SDK.
– Navigate to SAP Development Tools for Eclipse and then select for download the neo-java-web-sdk-1.91.9.zip from the Cloud section.
Once downloaded, you should see a folder with these contents:
Then holding the shift button right click on the tools folder to open a command prompt. Then, inside the cmd type the following command with your credentials.
neo open-db-tunnel -h hanatrial.ondemand.com -i your_hana_instance_name -a i/c/p/number_at_the_end_add_the_word_trial -u i/c/p/number
Pressing enter you should see this screen where you should type your password:
If the password is correct you have just created a tunnel with the HCP and this is (kind of) what you should see:
You are going to need these info so make sure the tunnel will not close.
(If for any reason, you accidentally close the tunnel you can repeat the process and a new password will be provided to you)
The first part is finished – On the second part we will describe how we will connect to HANA using a node.js script,
"After lots of searching I figured out that uploading .csv and .xlsx files on HANA through an SQL command required to have access at the HANA Server, which is impossible because I was working with the HCP Trial."
Well, your statement is only partly true: With the SQL statement (running on the HANA VM) you can only upload files that are visible in the context of that statement. Obviously, our HANA VM in HCP does not see your local PC, so the SQL statement for upload has to fail. That does not have anything to do with a Trial account. It applies to productive HANA instances as well.
I am sorry that you needed to do "Lots of searching" to find that out. After you posted your problem in the community, I had answered it in less than 2 hours . So, the lesson learned is hopefully: Don't try too hard; instead ask the community 😉 .
That's why i wrote "it was impossible to have access to the HANA server, because i was working with the HCP Trial" !
Regarding the searching you said, I really think that asking has to be the last option 🙂
Guys, you're both right 🙂 , perhaps just a bit "lost in translation" 😉 .
And yes, you shall search before you ask! --> The SCN Rules of Engagement
Have a great weekend!