Dataset Write
action_dataset_writeWrite, append, or upsert Parquet, CSV, or JSONL outputs into a Project or Workspace-shared Dataset.
About this Node
Writes, appends, or upserts tabular rows (JSON arrays/objects) or staged `FileRef` artifacts from `input_key` into a governed Project or Workspace-shared Dataset in Parquet, CSV, or JSONL format. Supports templated partition paths and filenames (`{{key}}`) and emits the written `FileRef` alongside row count, inferred schema, and operation stats.
Ports & Branches
inPort 0Inbound execution flowoutPort 1Outbound execution flow with write summaryHow this Node Reads Data
| Input | Access | Field | Example | Description |
|---|---|---|---|---|
| Source Data Key | State Key | input_key |
enriched_records |
Reads the tabular rows array, object, or `FileRef` stored at `input_key` in the node's incoming state. |
| Partition & Filename Templates | {{Template}} | filename_template |
dt={{report_date}} / part-{{batch_id}} |
Interpolates `{{key}}` placeholders inside `partition_path` and `filename_template`. |
State Keys Written (Outputs)
| Key Pattern | Type | Role | Description |
|---|---|---|---|
{output_key} |
FileRef |
Primary | `FileRef` handle pointing to the newly persisted dataset object. |
{output_key}_rows_written |
integer |
Secondary | Number of rows written or merged by this operation. |
{output_key}_schema |
array<object> |
Secondary | Column names and types of the written tabular dataset file. |
{output_key}_stats |
object |
Secondary | Detailed write statistics including row delta, previous partition count, and byte size. |
Tips & Best Practices
- Datasets must be created first in Storage before referencing their `dataset_id` in strict run-ready mode.
- Avoid dynamic `..` segments in `partition_path`—all paths are strictly sandboxed within the dataset root.
Commonly Paired With
Settings Parameters (10)
Configuration schema synchronized with the workflow catalog
| Field | Type | Default | Allowed Options | Description |
|---|---|---|---|---|
dataset_id |
string |
— |
— | UUID of the target Tabular Dataset |
dataset_name |
string |
— |
— | Display name of the target Tabular Dataset |
dataset_scope |
string |
project |
project, workspace | — |
dataset_format |
string |
parquet |
parquet, csv, jsonl | — |
write_mode |
string |
write |
write, append, upsert | — |
upsert_keys |
array<string> |
[] |
— | Composite primary key column names used in upsert mode |
partition_path |
string |
"" |
— | Optional relative partition subpath (supports {{context}} interpolation) |
filename_template |
string |
part-{{run_id}} |
— | Filename stem template (supports {{context}} interpolation) |
input_key |
string |
"" |
— | Upstream state key supplying FileRef(s) or structured rows |
output_key |
string |
dataset_write_result |
— | — |
Idempotent Upsert by Primary Key
Deduplicate and merge daily customer records into a Parquet dataset keyed by `customer_id`.
Node Configuration
{
"Id": "dataset_write_1",
"Type": "dataset_write",
"Config": {
"dataset_id": "ds-customers",
"dataset_name": "Customers",
"dataset_scope": "project",
"dataset_format": "parquet",
"write_mode": "upsert",
"upsert_keys": [
"customer_id"
],
"partition_path": "region={{region}}",
"filename_template": "customers-{{region}}",
"input_key": "normalized_customers",
"output_key": "written_customers"
}
}Sample Input State
{
"region": "NA",
"normalized_customers": [ { "customer_id": "C-10", "tier": "enterprise" } ]
}Expected Output State
{
"written_customers": { "type": "file_ref", "filename": "customers-NA.parquet" },
"written_customers_rows_written": 1
}Tip: In `upsert` mode, `upsert_keys` must list one or more columns present in every incoming row.
Append Audit Events to JSONL Dataset
Append structured AI agent audit logs to a Workspace-shared JSONL dataset after each run.
Node Configuration
{
"Id": "dataset_write_1",
"Type": "dataset_write",
"Config": {
"dataset_id": "ds-audit-log",
"dataset_name": "Audit Log",
"dataset_scope": "workspace",
"dataset_format": "jsonl",
"write_mode": "append",
"input_key": "audit_entry",
"output_key": "audit_file"
}
}Sample Input State
{
"audit_entry": { "decision": "approved", "confidence": 0.94 }
}Expected Output State
{
"audit_file": { "type": "file_ref", "filename": "part-01.jsonl" },
"audit_file_rows_written": 1
}