Geovisualization Developer's Guide

Define Dataset Schema

The define dataset schema request body is a JSON object sent in the request of a Geovisualization REST API request to define the metadata parameters for a new or modified dataset schema. See Data Format Guidelines for information about Geovisualization data formats and constraints.

When modifying the dataset schema, you cannot delete existing columns.

When modifying the dataset schema by column (with a POST on .../datasets/{DATASET_ID}/schema), the columns list in the request body needs to contain only the dataset columns you want to change. However, when replacing the entire schema (with a PUT on .../datasets/{DATASET_ID}/schema), you need to specify all columns, in order.

The request object can also contain a new name and description for the dataset (although these are not technically part of the schema).

Table 1. Define Dataset Schema Request Elements
Element Data Type Mandatory Description
type String Yes Only CSV is currently supported
delimiter String Yes The delimiter to be used in data. See Data Formats for supported delimiters.
encoding String No Only UTF-8 is currently supported
columns Array Yes An array of columns to change in the schema. If using POST, only the columns you want to change need to be included; if using PUT, all columns must be specified, so that the list must be of length equal to the number of columns in the dataset.

Each list item represents a column and contains the following elements:

  • index - the index number of the column
  • name - the name of the column
  • alias - the alternative name of the column
  • type - the data type of the column, for example "string", "number" or "date"
  • format - optional: the format of the "date" type, for example: "DD-MM-YYYY hh:mm:ss"

The code example below illustrates a typical request body.

{
  "type": "csv",
  "delimiter": ";",
  "encoding": "utf-8",
  "columns": [
    {
      "index": 0,
      "name": "Population",
      "alias": "Population",
      "type": "number"
    },
    {
      "index": 1,
      "name": "Species",
      "alias": "Species",
      "type": "string"
    },
    {
      "index": 2,
      "name": "Latitude",
      "alias": "Latitude",
      "type": "number"
    },
    {
      "index": 3,
      "name": "Longitude",
      "alias": "Longitude",
      "type": "number"
    },
    {
      "index": 4,
      "name": "Notes",
      "alias": "Notes",
      "type": "string"
    },
    {
      "index": 5,
      "name": "Timestamp",
      "alias": "Timestamp",
      "type": "date",
      "format": "DD-MM-YYYY hh:mm:ss"
    }
  ]
}

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.