Create Column

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/column
API call form
Examples

Native columns are created automatically when adding a dataset (e.g. from a connector or a local upload). Manually creating columns is useful if you want to e.g. create a derived column (make sure to validate the expression against syntax and logical errors using the validate action first).

In order to use the column, you will have to associate it to a dataset later on (which requires edit access to the dataset).

Request parametersResponse schema
id UUID

The unique identifier of the entity

name Multilingual string

Internationalized name of the column.

description Multilingual string

Internationalized description of the column.

order NUMBER

Order of this column in the dataset (e.g. 0, 1, 2). This is a required field.

source_name STRING

The original name of the column (immutable after creation). This property will be set automatically when uploading a dataset or when creating a dataset via the data push API. For derived columns, this field should not be set.

type STRING

Column type ( numeric , datetime , hierarchy or spatial ). For datasets coming from connectors, this field is automatically set based on the source types exposed by your data source and cannot be changed manually. For local uploads, this field can be modified at any time with immediate effect for all historical and new data.

subtype STRING

Indicate the subtype of the column. Depending on the column type, the subtype can be either topography , coordinates , currency , duration , date , datetime , or ip_address .

format STRING

Default formatting, used to present data in charts or tables (can still be customized in each chart).

informat STRING

Default informat, used to interpret raw input data. Can be modified at any time with immediate effect for all historical and new data. Default informat, used to interpret raw input data. Can be modified at any time with immediate effect for all historical and new data.

  • For numeric type: numeric or percentage

  • For hierarchy type: hierarchy

  • For datetime type, either:

    • YYYY-MM-DD HH:mm:ss.SSS (ISO-style)

    • MM-DD-YYYY HH:mm:ss.SSS (US-style)

    • DD-MM-YYYY HH:mm:ss.SSS (EU-style)

    • X (UNIX timestamp, seconds since 1/1/1970)

    • x (UNIX timestamp, milliseconds since 1/1/1970)

The actual data can have a different input format (e.g. different separators, named months, ...). The informat only indicates the order of parsing.

isLabel BOOLEAN

Whether this column contains labels used for topographic features (e.g. municipality names).

lowestLevel NUMBER

(Datetime only) Most precise datetime level used in the source data (1 - year, 9 - millisecond). The dashboard editor will only allow these levels to be used as slots.

expression STRING

Derived column expression. Must be a valid expression.

created_at DATETIME

The datetime when the resource was created.

updated_at DATETIME

The datetime when the resource was last updated.

securable_id UUID

The unique identifier of the securable.

width NUMBER

Data table column header width (in pixels). Defaults to 170.

colors_enabled BOOLEAN

When this boolean is set, colors set via the hierarchy endpoint will override colors in the dashboard.

hierarchy_enabled BOOLEAN

When this boolean is set, hierarchies can be used in the dashboard editor and dashboards.

If you are experimenting with Hierarchies you can keep this disabled until you want them to be visible/usable. If you only use hierarchies to override colors/names/ordering, keep it disabled. More information can be found in Hierarchy

currency_id STRING

Currency ID for this column. The currency_id is expected in the form of an ISO 4217 currency code , for example: EUR or USD .

duration_levels ARRAY[NUMERIC]

Set the default formatting of the numeric column with subtype duration. Array of duration levels for the column (1 - year, 9 - millisecond).

value NUMERIC
duration_format STRING

Set the default formatting of the numeric column with subtype duration.

  • long : Long format (e.g. 1 year 3 days , 2 months , 3 hours 20 minutes )

  • short : Short format (e.g. 1y 3d , 2m , 3h 20m )

  • time : Time format (e.g. 03:20:34 ). This is only supported if hour and minute levels are enabled, and no higher levels are enabled

custom_metadata OBJECT

Custom metadata attached to this column. Must be a valid JSON object with a maximum size of 65536 bytes. Set to null to clear previously stored metadata.

Can be executed by:
Logged-in User
Can be associated to:
Securable
Joins
HierarchyLevels
Currency
Did this page help you?
Yes No
Language
Shell
Node
Java
.NET
Python
PHP
Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "id": "8014daa9-bc79-42ee-b71d-81dc1525a3c8",
  "name": {
    "en": "Purchase id"
  },
  "description": null,
  "order": 1,
  "source_name": "Purchase id",
  "type": "hierarchy",
  "subtype": null,
  "format": "",
  "informat": "hierarchy",
  "previous_datetime_informat": null,
  "color": "#3182bd",
  "prefix": null,
  "suffix": null,
  "isLabel": false,
  "minBound": null,
  "maxBound": null,
  "cardinality": null,
  "lowestLevel": 0,
  "highestLevel": 0,
  "minimum": null,
  "maximum": null,
  "expression": null,
  "derivation": null,
  "version": 0,
  "width": 170,
  "hierarchy_enabled": false,
  "ordering_enabled": false,
  "colors_enabled": true,
  "aggregation_type": "sum",
  "custom_aggregations": null,
  "custom_metadata": null,
  "duration_levels": null,
  "duration_format": "long",
  "created_at": "2024-01-16T15:21:37.924Z",
  "updated_at": "2024-01-16T15:21:37.924Z",
  "securable_id": "807623f5-ac65-4022-bc87-595b412ce397",
  "aggregation_id": null,
  "currency_id": null
}