Add two ElasticSearch datasets (indeces) using an already existing account. This will create the Securable and Column entities and make them available for querying.
The fields to be specified are:
Connection ID: The ID of the Connection. Retrieve the ID to specify as detailed here
action: create
provider: elasticsearch
datasets: array of one or multiple datasets (indeces) that you would like to add.
Notes :
Note that text fields you want to use for filtering, grouping or aggregations must either be of the type keyword or of the type text but have a subfield of the type keyword . More information on this can be found in the ElasticSearch docs .
You can only select indexes to add as a dataset. If you want to add a dataset that uses a "*" wildcard naming for the source index, you can create an alias that references an index with a wildcard. Make sure the (readonly) user has sufficient permissions to list/query aliases too in that case. Example:
POST _aliases
{
"actions": [
{
"add": {
"index": "logs-*",
"alias": "logs"
}
}
]
}npm install @luzmo/nodejs-sdk{
"count": 2,
"data": [
{
"rows": 0,
"featured": false,
"modified_at": "2024-08-14T08:54:56.248Z",
"cache": 0,
"uses_clickhouse_experimental": false,
"meta_sync_interval": 1,
"meta_sync_inherit": true,
"meta_sync_enabled": true,
"id": "dff8ffd5-366f-4a5a-bb7a-c3b32fa2b41a",
"type": "dataset",
"description": null,
"account_id": "098db254-98c9-45c0-963d-bcf8ac729b8c",
"source_dataset": "098db254-98c9-45c0-963d-bcf8ac729b8c",
"subtype": "elasticsearch",
"storage": "client",
"source_sheet": "customers",
"name": {
"en": "customers",
"nl": "customers",
"fr": "customers"
},
"updated_at": "2024-08-14T08:54:56.263Z",
"created_at": "2024-08-14T08:54:56.248Z",
"contents": null,
"css": null,
"transformation": null,
"subtitle": null,
"source_query": null,
"is_variant": false,
"migrated_rows": null,
"last_metadata_sync_at": null,
"last_metadata_sync_attempt_at": "2024-08-14T08:54:56.249Z",
"original_id": null,
"acceleration_id": null,
"template_id": null,
"modifier_id": "abca9830-0dad-4b11-a6d4-23972c124020",
"owner_id": "abca9830-0dad-4b11-a6d4-23972c124020",
"source_template_id": null
},
{
"rows": 0,
"featured": false,
"modified_at": "2024-08-14T08:54:56.248Z",
"cache": 0,
"uses_clickhouse_experimental": false,
"meta_sync_interval": 1,
"meta_sync_inherit": true,
"meta_sync_enabled": true,
"id": "038c9966-6c0b-4faa-a600-46c5c34b04e2",
"type": "dataset",
"description": null,
"account_id": "098db254-98c9-45c0-963d-bcf8ac729b8c",
"source_dataset": "098db254-98c9-45c0-963d-bcf8ac729b8c",
"subtype": "elasticsearch",
"storage": "client",
"source_sheet": "orders",
"name": {
"en": "orders",
"nl": "orders",
"fr": "orders"
},
"updated_at": "2024-08-14T08:54:56.272Z",
"created_at": "2024-08-14T08:54:56.248Z",
"contents": null,
"css": null,
"transformation": null,
"subtitle": null,
"source_query": null,
"is_variant": false,
"migrated_rows": null,
"last_metadata_sync_at": null,
"last_metadata_sync_attempt_at": "2024-08-14T08:54:56.249Z",
"original_id": null,
"acceleration_id": null,
"template_id": null,
"modifier_id": "abca9830-0dad-4b11-a6d4-23972c124020",
"owner_id": "abca9830-0dad-4b11-a6d4-23972c124020",
"source_template_id": null
}
]
}