Bring your data into object store layer
- Last UpdatedMar 27, 2025
- 4 minute read
Objectives: Understand how to bring your own data into HERE platform using an object store layer.
Complexity: Beginner
Time to complete: 30 min
Dependencies: Organize your work in projects
Source code: Download
The example in this tutorial demonstrates how you can bring your data into the HERE Platform by using the object store layer.
The object store layer is a distributed and highly durable key/value store, with the additional capability of listing the keys. You can find more information on various layers here: Data Service Documentation.
This tutorial includes the following steps:
- Create a catalog with an object store layer.
- Upload one file from the local file system to the Object store, using the OLP Command Line Interface (CLI).
- Upload multiple files from the local file system to the Object store layer using Apache Hadoop.
In preparation, you must create a catalog containing an Object store layer.
Create catalog
You must create a catalog. Follow the steps outlined in Organize your work in projects, using the OLP Command Line Interface (CLI).
Create a file named bring-your-data.json
with the following content, and replace $YOUR_CATALOG_ID
with an identifier of your choice.
Replace $YOUR_CATALOG_ID
with your own identifier and then run the following command:
Note
If a billing tag is required in your realm, update the config file by adding the
billingTags: ["YOUR_BILLING_TAG"]
property to thelayer
section.
Upload single file to the Object store layer using OLP CLI
You can upload a single file from your local file system to the Object store layer using the OLP Command Line Interface (CLI).
1. Upload file
Replace $YOUR_CATALOG_HRN
in the following command with the value of HRN which you received from the create catalog step, and then run the following command:
The previous command uploads your local file test-data-cli/test-file
to the Object store layer.
2. List uploaded file
You can verify your upload by listing the files from the layer. Use the following command from OLP CLI, after replacing $YOUR_CATALOG_HRN with the HRN you received from the create catalog step. Then run the following command:
3. Get contents of uploaded file
To obtain the data from the previous file in the Object store layer, replace $YOUR_CATALOG_HRN
with the value of the HRN which you received from the create catalog step. Then run the following command:
Upload multiple files to the object store layer using Apache Hadoop
You can upload multiple files from your local file system to the Object store in parallel, in a distributed manner, using Apache Hadoop.
You must export the JAVA_HOME
variable to your environment before you can run Apache Hadoop commands.
Follow these steps to upload multiple files using Apache Hadoop:
1. Export HADOOP_VERSION variable
You must export the HADOOP_VERSION
variable to your environment. For this tutorial, run the following command to export HADOOP_VERSION
:
2. Download Apache Hadoop
You must download Apache Hadoop. Run the following command to download the appropriate version of Apache Hadoop:
3. Extract Apache Hadoop
You must extract the tarball which you downloaded in the previous step as follows:
4. Download Hadoop FS support Jar
You must download the Hadoop FS Support assembly jar provided by the Data Client Library by running the following command:
5. Upload data using Apache Hadoop
You must replace $YOUR_CATALOG_HRN with the catalog HRN you received from the previous create catalog step in the following script, and run it as shown here:
The previous command uploads the test-data-hadoop
directory, which contains three files: test-file-1
, test-file-2
, and test-file-3
. These files are uploaded to the Object store layer using Apache Hadoop.
6. List the uploaded files using Apache Hadoop
You can verify the upload from the previous command by listing the uploaded files, using Apache Hadoop. Run the following command, after replacing $YOUR_CATALOG_HRN with the HRN you received from the create catalog step.
The previous command lists all the files in the test-data-hadoop
directory from the Object store layer.
Copying data from other storages to the object store layer
You can copy your data from any Apache Hadoop compatible storage, such as AWS S3 and Azure Blob Storage, to the Object store layer using the steps mentioned previously. You must change the source path from the local file system to remote storage.
You can discover more detail on how to use Apache Hadoop to copy data from one storage to another here: DistCp and Object Stores
Further information
For additional details on the topics covered in this tutorial, you can refer to the following sources:
- For information on the object store layer type, read Data Service documentation
- For details on the Hadoop FS Support library, read Data Client Library Developer Guide
- For details on the command line interface interactions which can be implemented with the Object store layer, read Command Line Interface Developer Guide
- For details on Apache Hadoop, read Apache Hadoop Apache Hadoop DistCp Apache Hadoop Filesystem Shell