Create Dataset

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/securable

Datasets and dashboards are in the Luzmo API a type of securable . As such, the API calls to create, update, delete, ... datasets or dashboards are executed against the securable endpoint.

Properties relevant to one, may not be relevant to the other. Those will be null (e.g. contents is null for a dataset while for dashboards it is one of the most important properties as it holds the definition of screenmodes, charts, ...).

Any user with an API token can create a dataset. The user that creates the dataset will be automatically associated as the owner. Note that the creation of a dataset simply creates a securable of a certain type with properties such as name, title and description. To actually add data to the dataset you also have to create columns, associate them to the dataset and push data to the dataset.

⚠️ We advice to create your dataset automatically, rather than creating your dataset via this endpoint. The creation of a dataset via this route involves several steps (creation of dataset, creation of columns, association of columns and datasets and finally adding of the data) which need to be executed entirely correct to ensure you have a working dataset. We thus advise to instead look at this documentation:
  • via the data endpoint if you are looking to create a dataset for data push
  • via the dataprovider endpoint if you are looking to create a dataset based on a connection to your database or plugin. Also check the dataprovider to understand how to programmatically establish a connection to your data source.
Request parametersResponse schema
id UUID

The unique identifier of the entity

type STRING

Type of the securable. For datasets, this is dataset .

subtype STRING

Data source identifier for the dataset. For native or plugin connector datasets, this is equal to the connector slug. Local uploads use upload , and datasets created through the Data API service use api .

name Multilingual string

Internationalized title of the dataset.

description Multilingual string

Internationalized description of the dataset.

subtitle OBJECT

Internationalized subtitle of the dataset.

ai_context STRING

Plain-text AI context for this dataset. Luzmo IQ uses this field as additional business context when answering questions or generating charts. It enriches, but does not replace, the dataset name and description. This field is shared across all languages and is not internationalized. Set it to null to clear previously stored AI context. The API stores and returns the full value; long values may be truncated only when rendered into AI prompts.

custom_metadata OBJECT

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

source_dataset STRING

Identifier of the source data connection or source dataset backing this dataset.

source_sheet STRING

Data source identifier for this dataset. Depending on the data source, this can be a combination of schema and table name. Will be null for SQL datasets.

source_query STRING

Query used for SQL datasets. Will be null for datasets that are not SQL datasets.

transformation STRING

Immutable transformation definition used by the dataset, or null when no transformation is configured.

storage STRING

Storage backend used by the dataset. This property is read-only.

rows NUMBER

Number of rows currently stored in the dataset. This property is read-only.

is_variant BOOLEAN

Whether this dataset is a variant of another securable. This property is read-only.

meta_sync_interval NUMBER

Metadata synchronization interval in hours when meta_sync_inherit is false .

meta_sync_inherit BOOLEAN

Whether metadata synchronization settings are inherited from the parent connection.

meta_sync_enabled BOOLEAN

Whether automatic metadata synchronization is enabled when meta_sync_inherit is false .

last_metadata_sync_at DATETIME

Time of the last successful metadata synchronization, or null if metadata has not been synchronized. This property is read-only.

cache NUMBER

Number of seconds queries to this dataset are cached in Luzmo's caching layer. Defaults to 0, which disables caching for this dataset. You can invalidate the cache before it expires by calling the update method on the data endpoint.

acceleration_id STRING

ID of the acceleration (WARP) that periodically syncs this dataset into Luzmo's high-performance storage. Will be null when the dataset is not accelerated. Include the Acceleration association to retrieve the full acceleration configuration.

created_at DATETIME

RFC 3339 date time string indicating when the resource was created

updated_at DATETIME

RFC 3339 date time string indicating when the resource was last updated

modified_at DATETIME

RFC 3339 date time string indicating when the dataset's contents (for example its data or metadata) were last modified. This can differ from updated_at , which tracks changes to the dataset record itself.

owner_id STRING

ID of the user that owns this dataset.

account_id STRING

ID of the account or connection associated with this dataset.

Can be executed by:
Organization Editor
Can be associated to:
Columns
Groups
Users
Schedule
Tags
Collections
favorites
EmbedFilterGroups
Acceleration
Account
Dashboards
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": "f13df731-fff4-4b6b-b6e0-58a7d3956685",
  "type": "dataset",
  "subtype": "demodataplugin",
  "name": {
    "en": "Sales dataset",
    "nl": "Verkoopsgegevens",
    "fr": "Données de ventes"
  },
  "description": {
    "en": "Dataset with demo sales data.",
    "nl": "Dataset met demo verkoopsgegevens",
    "fr": "Dataset contenant des données de ventes"
  },
  "ai_context": null,
  "custom_metadata": {
    "owner": "ops",
    "nested": {
      "level": "L1"
    }
  },
  "subtitle": null,
  "contents": null,
  "css": null,
  "source_dataset": "8b7954e2-3664-4437-b8cb-4b05b6ddee91",
  "source_sheet": "sales_dataset",
  "source_query": null,
  "transformation": null,
  "rows": 102,
  "featured": false,
  "modified_at": "2023-09-14T15:36:26.338Z",
  "cache": 0,
  "storage": "client",
  "is_variant": false,
  "migrated_rows": null,
  "uses_clickhouse_experimental": false,
  "meta_sync_interval": 1,
  "meta_sync_inherit": true,
  "meta_sync_enabled": true,
  "last_metadata_sync_at": "2024-02-21T11:47:27.432Z",
  "last_metadata_sync_attempt_at": "2024-02-21T11:47:25.391Z",
  "created_at": "2023-09-14T15:36:26.338Z",
  "updated_at": "2024-02-21T11:47:27.431Z",
  "acceleration_id": null,
  "account_id": "8b7954e2-3664-4437-b8cb-4b05b6ddee91",
  "template_id": null,
  "original_id": null,
  "modifier_id": "8ad836a8-3547-4ed6-ba59-b445bfed05ed",
  "owner_id": "8ad836a8-3547-4ed6-ba59-b445bfed05ed",
  "source_template_id": null
}