How to use Hive's Sorted Set - Demo App

Hive is a data storage system where data is organized in key-value pairs. Hive supports different types of key/value pairs, one of these formats is called SortedSet. With SortedSet, the value in a key/value pair is a collection of data items sorted by “score”. Every item in the collection has its own score used by Hive to order the values. In this recipe you will build a sample that works with data stored in Hive. For an overview of the working app, please see the video below:

  1. To get started, you will need to import data into Backendless database. To do that, download the file below:
    Companies.csv (39.3 KB)

  2. In your Backendless application, make sure you’re in the BACKEND section. Navigate to Manage > Import and click the BROWSE... button in the Import Single file box next to Data Service. Select the csv file you downloaded and click the IMPORT button.

  3. Change the data type for the description and the marketCap columns as shown below:

  4. Click the FINALIZE IMPORT button. You can check the progress of the import as shown in the video above.

  5. Once the import of the data is done, upload the logo files. To do that, download the following archive to your computer:
    company-logos.zip (646.5 KB)

  6. In Backendless Console navigate to the Files section and change the directory to web. Upload the zip file into the web directory. This can be done either by drag-and-dropping the file into console or using the Upload File menu.

  7. Once the file is uploaded, extract the archive by using the icon shown below:

  8. The files from the archive will be extracted into the company-logos directory. Rename the directory to companies by clicking the edit icon and changing the name:

  9. At this point the data in the backend is ready. Switch to the FRONTEND section and create a new UI Builder page from the SortedSet Demo App page template. The created page will have all the logic you need to run the example.

1 Like