Open the SAP Predictive Analytics documentation page in a browser and click on the View All for the Sample section.
This will display the list of sample dataset available.
Right-click on the Download the Sample Geo localization link and use the Save link address to get the download URL.
Open the download URL and save the sample data archive either:
- the Eclipse host if you want to use the SAP HANA Tools for Eclipse
- the SAP HANA, express host if you want the IMPORT FROM SQL command
Extract the files (located in the Geolocalization
subdirectory in the embedded Geolocalization.zip
archive).
Import Using the SAP HANA Tools for Eclipse
You can extract the sample file anywhere you want on the Eclipse host.
You can now move to Step 3: Import Using the SAP HANA Tools for Eclipse.
Import Using the IMPORT FROM SQL command
Here is an example script that you can reuse to download and extract the dataset directly from the SAP HANA, express edition host:
URL=https://help.sap.com/http.svc/download?deliverable_id=20555041
OUTPUT_FILE=sample_geolocalization
OUTPUT_DIR=/usr/sap/HXE/HDB90/work/$OUTPUT_FILE
# create a new subdirectory for the sample data
mkdir $OUTPUT_DIR
# download the archive in the sample data directory
# wget -O $OUTPUT_DIR/$OUTPUT_FILE.zip $URL
curl $URL -o $OUTPUT_DIR/$OUTPUT_FILE.zip
# switch to the new directory
cd $OUTPUT_DIR
# extract all archives and embedded archives
while [ "`find . -type f -name '*.zip' | wc -l`" -gt 0 ]; \
do find -type f -name "*.zip" \
-exec unzip -o -- '{}' \; \
-exec rm -- '{}' \;; done
It requires CURL (or WGET) to be installed.
The dataset files should now be located in: /usr/sap/HXE/HDB90/work/sample_geolocalization/Geolocalization
You can now move to Step 3: Import Using the IMPORT FROM SQL command.