app:record:bulk:insert
Inserts a set of records into a schema table in one write and returns their identifiers
Options
| Name | Type | Description |
|---|---|---|
schema | string | The name of the schema (database) that contains the table |
table | string | The name of the table to insert the records into |
records | []Record | The records to insert, each a key-value object |
Outputs
| Name | Type | Description |
|---|---|---|
ids | []string | The identifiers of the inserted records, in the order they were given |
count | int | The number of records inserted |
Example
name: Insert several records at once
actions:
- name: inserted
component: app:record:bulk:insert
vars:
schema: content
table: articles
records: "{{ prepared.items }}"
outputs:
ids: "{{ inserted.ids }}"
count: "{{ inserted.count }}"