app:record:insert
Inserts a new record into a schema table and returns the persisted record
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 record into |
record | Record | The key-value data to insert |
Outputs
| Name | Type | Description |
|---|---|---|
record | Record | The newly inserted record as persisted in the database |
Example
name: Insert a record
actions:
- name: inserted
component: app:record:insert
vars:
schema: content
table: articles
record:
title: "Hello world"
body: "The first post."
status: draft
outputs:
article: "{{ inserted.record }}"