mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-23 21:06:51 +02:00
Co-authored-by: Daria Staferova <daria.staferova@n8n.io> Co-authored-by: Nikhil Kuriakose <nikhil.kuriakose@n8n.io>
1.6 KiB
1.6 KiB
data-table
Manage n8n data tables and their rows.
data-table list
List all data tables.
n8n-cli data-table list
data-table get
Get a data table by ID.
n8n-cli data-table get dt-abc
data-table create
Create a data table with columns.
n8n-cli data-table create --name=Inventory \
--columns='[{"name":"item","type":"string"},{"name":"qty","type":"number"}]'
data-table delete
Delete a data table and all its rows.
n8n-cli data-table delete dt-abc
data-table rows
Query rows from a data table.
n8n-cli data-table rows dt-abc
n8n-cli data-table rows dt-abc --search=keyword --limit=50
n8n-cli data-table rows dt-abc --format=json
| Flag | Description |
|---|---|
--search |
Full-text search across string columns |
--filter |
Filter as JSON string |
--limit |
Maximum number of results |
data-table add-rows
Insert rows from a JSON file.
n8n-cli data-table add-rows dt-abc --file=rows.json
The JSON file should contain an array of row objects, e.g.:
[
{ "item": "Widget", "qty": 100 },
{ "item": "Gadget", "qty": 50 }
]
data-table update-rows
Update rows matching a filter.
n8n-cli data-table update-rows dt-abc --file=update.json
The JSON file should contain {filter, data}.
data-table upsert-rows
Upsert rows (update if exists, insert otherwise).
n8n-cli data-table upsert-rows dt-abc --file=upsert.json
data-table delete-rows
Delete rows matching a filter.
n8n-cli data-table delete-rows dt-abc --filter='{"type":"and","filters":[...]}'