Data lake Files is a component of SAP HANA Cloud that provides secure, efficient storage for large amounts of structured, semi-structured, and unstructured data. Data lake Files is automatically enabled when you provision a data lake instance.
Provisioning creates the data lake Files container as a storage location for files. This file store lets you use data lake as a repository for big data. For more information on provisioning data lake Files with your data lake instance, see Creating SAP HANA Cloud Instances.
I will introduce the step by Rest Api.
Okay, the data lake file configuration is complete.
We can start to fetch or upload files through the Rest API.
Get list status:curl --insecure -H "x-sap-filecontainer: {{instance-id}}" --cert ./client.crt --key ./client.key "https://{{instance-id}}.files.hdl.canary-eu10.hanacloud.ondemand.com/webhdfs/v1/user/home/?op=LISTSTATUS" -X GET
You will see:
curl --location-trusted --insecure -H "Content-Type:application/octet-stream" -H "x-sap-filecontainer: {{instance-id}}" --cert ./client.crt --key ./client.key --data-binary "@Studies.csv" "https://{{instance-id}}.files.hdl.canary-eu10.hanacloud.ondemand.com/webhdfs/v1/user/home/Studies.csv?op=CREATE&data=true&overwrite=true" -X PUT
Go to the SAP HANA database explorer and open the account.
Note that in this step, you must ensure that the table fields in the database are the same as those in the csv file.
The IQ table I use here to load the data, please refer to
CALL SYSHDL_BUSINESS_CONTAINER.REMOTE_EXECUTE(' LOAD TABLE MANAGEMENT_STUDIES (status_code,study_num,description,study_ID,protocol_ID,lastSubjectLastVisit,isLeanStudy,studyPhase,ID) FROM ''hdlfs:///user/home/archiving/Studies.csv'' format csv SKIP 1 DELIMITED BY '','' ESCAPES OFF' );
You can use data lake file to save some unstructured data, or to storage some archiving files, which seems to be a new good choice besides object store and AWS, etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
11 | |
11 | |
10 | |
9 | |
8 | |
8 | |
7 | |
6 | |
5 |