Creating Magic ETL Dataflows Programmatically in Domo
Overview
Magic ETL dataflows in Domo can be created, updated, and executed entirely through the
. The dataflow is defined as a JSON document describing a directed acyclic graph (DAG) of actions — input nodes, transforms, and output nodes.
Use for all dataflow operations.
| Operation | CLI command |
|---|
| List dataflows | community-domo-cli dataflows list
|
| Get full dataflow definition | community-domo-cli dataflows get-definition <ID>
|
| Run a dataflow | community-domo-cli -y dataflows run <ID>
|
| Check execution status | community-domo-cli dataflows executions <ID> --limit 1
|
| Create a dataflow | community-domo-cli -y dataflows create --body-file <FILE>
|
| Update a dataflow | community-domo-cli -y dataflows update <ID> --body-file <FILE>
|
| Rename/enable | community-domo-cli -y dataflows update <ID> --body-file <FILE>
|
Important: All operations use
, which handles auth automatically. The created dataflow is not in DRAFT state and can be executed immediately — no UI save required.
Mutating commands need (or ). Create, update, and run prompt
Execute mutating action? [y/N]
. Without
, the CLI aborts when stdin is not a TTY (scripts, Python
, CI). Always pass
for automation.
Never search for user IDs. is optional — omit it entirely. Never call
community-domo-cli users list
or any users endpoint to find a user ID for dataflow creation.
CLI Commands for Dataflows
List All Magic ETL Dataflows
bash
community-domo-cli dataflows list
Get a Dataflow Definition
bash
community-domo-cli dataflows get-definition <DATAFLOW_ID>
Returns the full JSON definition including all actions, inputs, outputs, and GUI positions via
GET /dataprocessing/v1/dataflows/{id}
. This is the best way to understand the JSON structure — fetch an existing dataflow and study it. Always use this before issuing an update.
Run a Dataflow
bash
community-domo-cli -y dataflows run <DATAFLOW_ID>
List Dataflow Executions
bash
community-domo-cli dataflows executions <DATAFLOW_ID> --limit <LIMIT>
Check a Specific Execution
bash
community-domo-cli dataflows execution-get <DATAFLOW_ID> <EXECUTION_ID>
Returns execution state (
,
,
,
), row counts, errors, etc.
Creating a Dataflow via the CLI
Create
bash
community-domo-cli -y dataflows create --body-file <FILE>
The body
must include
. The created dataflow can be executed immediately — see Gotcha #7 and #11 for details.
Updating an Existing Dataflow
bash
community-domo-cli -y dataflows update <DATAFLOW_ID> --body-file <FILE>
Always fetch the full definition with
first, modify it, then pass it via
. Include the complete definition — PUT replaces the entire dataflow.
Dataflow JSON Structure
Top-Level Fields
json
{
"name": "My Magic ETL",
"databaseType": "MAGIC",
"responsibleUserId": 149955692,
"draft": false,
"enabled": true,
"runState": "ENABLED",
"engineProperties": {
"kettle.mode": "STRICT"
},
"inputs": [ ... ],
"outputs": [ ... ],
"actions": [ ... ]
}
| Field | Description |
|---|
| Display name of the dataflow |
| Must be for Magic ETL |
| Numeric user ID of the owner |
| for a published dataflow |
| to allow execution |
| to allow scheduled runs |
| {"kettle.mode": "STRICT"}
is standard |
| Array of input dataset references |
| Array of output dataset references |
| Array of action nodes (the DAG) |
Never search for user IDs. is optional — omit it entirely. Never call
community-domo-cli users list
or any users endpoint to find a user ID for dataflow creation.
Top-Level Field (Canvas Layout & Sections)
The
field controls the visual canvas layout, including colored
Section zones that group related tiles. When
, the canvas
array controls tile positioning (overriding action-level
/
).
json
{
"gui": {
"version": "1.0",
"canvases": {
"default": {
"canvasSettings": {
"coarserGrid": false,
"hideCoarserGridPopUp": false,
"backgroundVariant": "None"
},
"elements": [
{ "type": "Section", ... },
{ "type": "Tile", ... }
],
"disabledActions": []
}
},
"useGraphUI": true
}
}
Section Elements (Colored Zone Backgrounds)
Sections are colored rectangular zones that visually group related tiles on the canvas:
json
{
"id": "a-unique-uuid",
"type": "Section",
"x": 56,
"y": 72,
"width": 1320,
"height": 288,
"name": "Work Orders Denormalization",
"backgroundColor": "var(--colorChartBlue6)"
}
| Field | Description |
|---|
| Unique UUID for the section |
| Must be |
| , | Absolute position on the canvas (top-left corner) |
| , | Size of the colored zone in pixels |
| Label displayed in the section header |
| CSS variable for the zone color (see table below) |
Available Section Background Colors
| CSS Variable | Color | Suggested Use |
|---|
| Light blue | Input/staging pipelines |
| Light green | Quality/validation pipelines |
| Light purple | Output/publishing pipelines |
| Light orange | Transform/enrichment pipelines |
| Light red | Filter/exclusion pipelines |
| Light yellow | Shared/dimension tables |
The
suffix indicates the lightest shade — ideal for section backgrounds so tile labels remain readable.
Tile Elements (Action Positions)
Each action node has a corresponding
element in the canvas. Tiles can be
parented inside a Section, in which case their
/
are
relative to the Section's position:
json
{
"id": "LoadFromVault-work_orders",
"type": "Tile",
"x": 72,
"y": 56,
"parentId": "section-uuid-here",
"color": null,
"colorSource": null
}
| Field | Description |
|---|
| Must match the action's field |
| Must be |
| , | Position — absolute if no , relative to parent Section if is set |
| UUID of the parent Section element (omit for unparented tiles) |
| Optional integer color code for the tile icon |
Reparenting formula: When moving a tile into a section, convert absolute to relative coordinates:
relativeX = absoluteX - section.x
relativeY = absoluteY - section.y
Tiles without
render at absolute canvas coordinates and float outside any section.
ALWAYS Add Sections When Creating Dataflows
When building a dataflow with multiple logical branches or processing stages, always add Section elements to organize the visual layout. This is a best practice that makes dataflows immediately understandable. Group tiles by:
- Pipeline branch (e.g., each fact table's join chain gets its own section)
- Processing stage (e.g., "Input/Staging", "Transforms", "Output")
- Shared resources (e.g., dimension tables used across branches)
Assign a distinct color to each section for visual differentiation.
Inputs Array
Each input references a Domo dataset that feeds into the dataflow:
json
"inputs": [
{
"dataSourceId": "422efbf4-6c96-4576-907b-eacae8379d5d",
"executeFlowWhenUpdated": false,
"dataSourceName": "RAW | SFDC | Accounts",
"onlyLoadNewVersions": false,
"recentVersionCutoffMs": 0
}
]
| Field | Description |
|---|
| UUID of the input dataset |
| Display name (for readability) |
| to auto-trigger the dataflow when this input updates |
| to only process new data versions |
Outputs Array
For a new dataflow where the output dataset doesn't exist yet:
json
"outputs": [
{
"dataSourceId": null,
"dataSourceName": "SFDC | Account Summary",
"versionChainType": "REPLACE"
}
]
Setting
to
tells Domo to create a new dataset on first run. After the first successful run, Domo assigns a UUID.
For an existing output dataset:
json
"outputs": [
{
"dataSourceId": "8fe448eb-231d-4ff5-95f1-86db64336e96",
"dataSourceName": "SFDC | Account Opportunity Summary",
"versionChainType": "REPLACE"
}
]
:
replaces all data each run. Other options include
.
Action Types
Actions are the nodes in the DAG. Each action has a unique
, a
, and references its upstream dependencies via
.
Valid types:
,
,
,
,
,
,
,
NOT valid (will fail with
):
,
,
Common Action Fields
Every action has these fields:
json
{
"type": "ActionType",
"id": "unique-action-id",
"name": "Human-readable name",
"dependsOn": ["upstream-action-id-1", "upstream-action-id-2"],
"settings": {
"preferredDatabaseEntityType": "TEMP_VIEW"
},
"gui": {
"x": 128,
"y": 128,
"color": null,
"colorSource": null,
"sampleJson": null
},
"tables": [{}]
}
| Field | Description |
|---|
| Unique identifier for this action node. Can be any string, but convention is |
| Array of action IDs that must complete before this one runs |
| / | Position in the visual canvas. When , the top-level gui.canvases.default.elements
array takes precedence — set both to stay consistent |
settings.preferredDatabaseEntityType
| Always |
| Always |
LoadFromVault (Input Node)
Loads data from a Domo dataset into the dataflow.
json
{
"type": "LoadFromVault",
"id": "LoadFromVault-accounts",
"name": "RAW | SFDC | Accounts",
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 128, "y": 128, "color": null, "colorSource": null, "sampleJson": null},
"previewRowLimit": 10000,
"propagateAi": false,
"filterPolicy": "LEGACY",
"dataSourceId": "422efbf4-6c96-4576-907b-eacae8379d5d",
"sourceType": "AUTO",
"executeFlowWhenUpdated": false,
"pseudoDataSource": false,
"truncateTextColumns": false,
"truncateRows": false,
"onlyLoadNewVersions": false,
"recentVersionCutoffMs": 0,
"tables": [{}]
}
Key fields:
- : UUID of the dataset to load
- : Should match the dataset name for clarity
- No — this is a root node
MergeJoin (Join)
Joins two upstream actions on specified keys.
json
{
"type": "MergeJoin",
"id": "MergeJoin-accounts-opps",
"name": "Join Accounts & Opp Summary",
"dependsOn": ["LoadFromVault-accounts", "GroupBy-opp-summary"],
"disabled": false,
"removeByDefault": false,
"notes": [],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 576, "y": 320, "color": null, "colorSource": null, "sampleJson": null},
"previewRowLimit": null,
"joinType": "LEFT OUTER",
"relationshipType": "MTM",
"step1": "LoadFromVault-accounts",
"step2": "GroupBy-opp-summary",
"keys1": ["Id"],
"keys2": ["AccountId"],
"on": null,
"schemaModification1": [],
"schemaModification2": [
{"name": "AccountId", "rename": "Opp_AccountId", "remove": true}
]
}
| Field | Description |
|---|
| , , , |
| — use this abbreviation, NOT (causes validation errors) |
| Action ID for the left side of the join |
| Action ID for the right side of the join |
| Array of column names from step1 to join on |
| Array of column names from step2 to join on (matched positionally with keys1) |
| Rename or remove columns from step1 (left side) |
| Rename or remove columns from step2 (right side) to avoid name collisions |
| Must include both and action IDs |
Note: Keys can be asymmetric —
/
. Domo matches by array position, not by column name.
schemaModification1 / schemaModification2
When two datasets share column names (e.g., both have
,
,
), use
to rename or remove the conflicting columns from the right-side (step2) dataset:
json
"schemaModification2": [
{"name": "Description", "rename": "Opportunities.Description", "remove": false},
{"name": "Id", "rename": "Opportunities.Id", "remove": false},
{"name": "Name", "rename": "Opportunities.Name", "remove": false},
{"name": "AccountId", "rename": "Opp_AccountId", "remove": true}
]
- — drops the column entirely from the output
- — keeps the column but renames it to the value
GroupBy (Aggregation)
Aggregates data by grouping columns and applying aggregation functions.
json
{
"type": "GroupBy",
"id": "GroupBy-opp-summary",
"name": "Summarize Opportunities per Account",
"dependsOn": ["LoadFromVault-opportunities"],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 352, "y": 512, "color": null, "colorSource": null, "sampleJson": null},
"input": "LoadFromVault-opportunities",
"addLineNumber": false,
"giveBackRow": false,
"allRows": false,
"groups": [
{"name": "AccountId"}
],
"fields": [
{"name": "Opportunity Count", "source": "Id", "type": "COUNT_ALL", "valuefield": null, "expression": null, "settings": null},
{"name": "Total Amount", "source": "Amount", "type": "SUM", "valuefield": null, "expression": null, "settings": null},
{"name": "Avg Amount", "source": "Amount", "type": "AVERAGE", "valuefield": null, "expression": null, "settings": null},
{"name": "Total Expected Revenue", "source": "ExpectedRevenue", "type": "SUM", "valuefield": null, "expression": null, "settings": null},
{"name": "Avg Probability", "source": "Probability", "type": "AVERAGE", "valuefield": null, "expression": null, "settings": null}
],
"tables": [{}]
}
| Field | Description |
|---|
| Action ID of the upstream data |
| Array of columns to group by. Each entry: |
| Array of aggregation definitions |
Aggregation Field Definition
json
{
"name": "Total Amount",
"source": "Amount",
"type": "SUM",
"valuefield": null,
"expression": null,
"settings": null
}
| Field | Description |
|---|
| Output column name for the aggregated value |
| Source column name to aggregate |
| Aggregation function (see below) |
Aggregation Types
| Type | Description | Confirmed |
|---|
| Sum of values | Yes |
| Mean of values | Yes |
| Count of all rows (including nulls) | Yes |
| Count of distinct values | |
| Minimum value | Yes |
| Maximum value | |
| First value in group | |
| Last value in group | |
| Concatenate values with comma separator | |
Important: The API uses
and
, not
or
. Using
returns a validation error:
"The value is invalid for expected type... AggregateType"
. This was discovered through testing.
Expression-Based Aggregations (Advanced)
Instead of using
+
, you can use full SQL aggregation expressions. Set
,
, and
to
and put the full expression in
:
json
{
"name": "Total Hours",
"source": null,
"type": null,
"valuefield": null,
"expression": "SUM(IFNULL(`Hours`,0))",
"settings": null
}
CRITICAL: The
must be a
full SQL aggregation expression — NOT just the function name.
"expression": "SUM(IFNULL(\
Hours`,0))""source": null` — CORRECT
- with — WRONG (treats "SUM" as a column name)
This allows embedding complex logic like CASE WHEN directly in the GroupBy without needing a pre-GroupBy ExpressionEvaluator:
json
{
"name": "LTM_Revenue",
"source": null, "type": null, "valuefield": null,
"expression": "SUM(CASE WHEN `Date` >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 12 MONTH) THEN IFNULL(`Revenue`,0) ELSE 0 END)",
"settings": null
}
WindowAction (Rank & Window)
Applies window functions — ranking, row numbering, lag/lead offsets — partitioned by group columns and ordered by sort columns. This is the programmatic equivalent of the "Rank & Window" tile in the Magic ETL UI.
json
{
"type": "WindowAction",
"id": "WindowAction-first-order",
"name": "First Order Date per Customer",
"dependsOn": ["LoadFromVault-finance"],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 352, "y": 128, "color": null, "colorSource": null, "sampleJson": null},
"input": "LoadFromVault-finance",
"groupRules": [
{"column": "customer", "caseSensitive": false}
],
"orderRules": [
{"column": "date_ymd", "caseSensitive": false, "ascending": true}
],
"additions": [
{
"name": "Customer Order Rank",
"operation": {
"type": "RANKING",
"operationType": "ROW_NUMBER",
"column": null,
"defaultValue": null,
"amount": null
}
}
],
"tables": [{}]
}
| Field | Description |
|---|
| Action ID of the upstream data |
| Partition columns — the window function is applied within each group |
| Sort order within each partition |
| Array of window function definitions to add as new columns |
groupRules
json
"groupRules": [
{"column": "customer", "caseSensitive": false},
{"column": "region", "caseSensitive": false}
]
Each entry partitions the data by that column. Multiple entries create a composite partition key.
orderRules
Defines the
within each partition:
json
"orderRules": [
{"column": "date_ymd", "caseSensitive": false, "ascending": true}
]
| Field | Description |
|---|
| Column to sort by |
| Whether string sorting is case-sensitive |
| for ASC, for DESC |
Multiple orderRules create a composite sort key.
additions (Window Function Definitions)
Each addition creates a new column with the result of a window function:
json
{
"name": "Output Column Name",
"operation": {
"type": "RANKING",
"operationType": "ROW_NUMBER",
"column": null,
"defaultValue": null,
"amount": null
}
}
Window Operation Types
| operationType | Description | column | amount |
|---|
| Sequential number within partition (1, 2, 3...) | | |
| Rank with gaps for ties (1, 2, 2, 4...) | | |
| Rank without gaps for ties (1, 2, 2, 3...) | | |
| operationType | Description | column | amount |
|---|
| Value from N rows before in the partition | Source column name | Number of rows to look back |
| Value from N rows ahead in the partition | Source column name | Number of rows to look ahead |
Example — LAG to get previous day's revenue:
json
{
"name": "Previous Day Revenue",
"operation": {
"type": "OFFSET",
"operationType": "LAG",
"column": "revenue",
"defaultValue": null,
"amount": 1
}
}
Example — ROW_NUMBER to rank orders per customer:
json
{
"name": "Customer Order Rank",
"operation": {
"type": "RANKING",
"operationType": "ROW_NUMBER",
"column": null,
"defaultValue": null,
"amount": null
}
}
Combining WindowAction with GroupBy
A common pattern is to use
for row-level ranking, then
for aggregation. For example, to find the first order date per customer:
- WindowAction: Partition by , order by ASC, add
- GroupBy: Group by , use on to get the first order date, plus / on numeric columns
The
passes through all original columns plus the new additions, so downstream actions have access to everything.
Filter (Row Filtering)
Filters rows based on column conditions. This is the programmatic equivalent of the "Filter Rows" tile in the Magic ETL UI.
json
{
"type": "Filter",
"id": "Filter-exclude-florida",
"name": "Exclude Florida",
"dependsOn": ["LoadFromVault-sales"],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 352, "y": 256, "color": null, "colorSource": null, "sampleJson": null},
"input": "LoadFromVault-sales",
"filterList": [
{
"leftField": "state",
"rightField": null,
"rightValue": {"value": "Florida", "type": "STRING"},
"rightExpr": "'Florida'",
"operator": "NE",
"expression": null,
"andFilterList": []
}
],
"tables": [{}]
}
| Field | Description |
|---|
| Action ID of the upstream data |
| Array of filter conditions (combined with OR logic) |
| Nested array within a filter for AND logic |
Filter Condition Fields
| Field | Description |
|---|
| Column name to filter on |
| Comparison operator (see table below) |
| Typed value object: {"value": "Florida", "type": "STRING"}
|
| String expression of the value, wrapped in single quotes for strings: |
| Column name to compare against (for column-to-column comparisons, otherwise ) |
Important: For string comparisons,
must be a typed object with
and
fields, and
must wrap the value in single quotes. Using a plain string for
returns a
error.
Expression-Based Filters (Alternative)
Instead of using
/
/
, you can use a raw SQL
for complex conditions:
json
{
"leftField": null,
"rightField": null,
"rightValue": null,
"rightExpr": null,
"operator": null,
"expression": "IFNULL(TRIM(`column_name`),'') <> ''",
"andFilterList": []
}
This is useful for multi-condition filters or filters with function calls. The expression is a SQL WHERE clause fragment.
Filter Operators
| Operator | Description | Confirmed |
|---|
| Not equal | Yes |
| Equal | |
| Less than | |
| Greater than | |
| Less than or equal | |
| Greater than or equal | |
| Is not null | Yes (from existing dataflow) |
| Is null | |
| Not in list | |
| In list | |
rightValue Type Values
| Type | Use For |
|---|
| Text comparisons |
| Number comparisons |
| Date comparisons |
ExpressionEvaluator (Add Formula)
Adds calculated columns using Domo's expression language. This is the programmatic equivalent of the "Add Formula" tile in the Magic ETL UI.
json
{
"type": "ExpressionEvaluator",
"id": "ExpressionEvaluator-month-trunc",
"name": "Add Month Column",
"dependsOn": ["Filter-exclude-florida"],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 480, "y": 256, "color": null, "colorSource": null, "sampleJson": null},
"input": "Filter-exclude-florida",
"expressions": [
{
"expression": "concat(year(`date_ymd`),MONTHNAME(`date_ymd`))",
"fieldName": "Year_Month",
"settings": {}
}
],
"tables": [{}]
}
| Field | Description |
|---|
| Action ID of the upstream data |
| Array of formula definitions |
Expression Definition
json
{
"expression": "concat(year(`date_ymd`),MONTHNAME(`date_ymd`))",
"fieldName": "Year_Month",
"settings": {}
}
| Field | Description |
|---|
| Domo formula expression. Column names must be wrapped in backticks. |
| Name of the new output column |
| Empty object |
Known Working Functions
| Function | Description | Example |
|---|
| Extract year from date | date_ymd`)` |
| Extract month number (1-12) | date_ymd`)` |
| Extract month name from date | date_ymd`)` |
| Concatenate strings | date_ymd`), MONTHNAME(`date_ymd`))` |
| Convert to date type | date_ymd`)` |
| Format date as string | date_ymd`, 'yyyy-MM-dd')` |
| Left substring | Date`, 7)` for year-month from "2025-01-15" |
| Left-pad string | date`), 2, '0')` |
| Null replacement (2 args only) | col`, 0)` |
| Null replacement (multi-arg) | a`, `b`, 'default')` |
| Remove whitespace | col`)` |
| Type casting | |
| Last day of month | date`)` |
| Subtract interval | date`, INTERVAL 12 MONTH)` |
| Timezone conversion | CONVERT_TZ(CURRENT_TIMESTAMP(),'UTC','US/Eastern')
|
| Current datetime | |
Important: is NOT a valid function and returns
"Unknown function: TRUNC_MONTH"
. To truncate dates to month level, use
concat(year(...), MONTHNAME(...))
or similar string-based approaches.
Expression Behavior Rules
- Expressions are processed in order — later expressions CAN reference fields computed by earlier ones in the same tile
- Adding an expression with the same as an existing column replaces that column's value (useful for type casting or reformatting)
- takes exactly 2 args; use for multi-arg null handling
- works for creating null typed columns
Multiple expressions can be added in a single ExpressionEvaluator action — each creates a new column (or replaces an existing one). All original columns are passed through.
Unique (Deduplicate)
Removes duplicate rows based on specified key columns. This is the programmatic equivalent of the "Remove Duplicates" tile.
json
{
"type": "Unique",
"id": "Unique-dedup",
"name": "Deduplicate",
"dependsOn": ["SelectValues-final"],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 800, "y": 256, "color": null, "colorSource": null, "sampleJson": null},
"input": "SelectValues-final",
"countRows": false,
"fields": [
{"name": "ColA", "caseInsensitive": false},
{"name": "ColB", "caseInsensitive": false}
],
"tables": [{}]
}
| Field | Description |
|---|
| Action ID of the upstream data |
| to add a count column showing how many duplicates were found |
| Array of columns that define uniqueness. Rows with identical values across all listed columns are deduplicated |
| for case-insensitive string matching |
Tip: Add a Unique tile after joins that might fan out rows (e.g., many-to-many joins).
SelectValues (Legacy / Not Valid for New Flows)
Selects specific columns and optionally renames them.
json
{
"type": "SelectValues",
"id": "SelectValues-final",
"name": "Select Final Columns",
"dependsOn": ["MergeJoin-final"],
"settings": {"preferredDatabaseEntityType": "TEMP_VIEW"},
"gui": {"x": 1024, "y": 320, "color": null, "colorSource": null, "sampleJson": null},
"input": "MergeJoin-final",
"select": [
{"name": "Id", "rename": "Account ID"},
{"name": "Name", "rename": "Account Name"},
{"name": "Industry"},
{"name": "Contact Count"},
{"name": "Total Amount"}
],
"tables": [{}]
}
- Only columns listed in are passed through; all others are dropped
- Omit to keep the original column name
Alternative format — uses
instead of
.
Only list columns you want to KEEP (with optional rename). Unlisted columns are dropped. Do NOT add
entries — they cause
validation errors.
Only list columns you want to KEEP (with optional rename). Unlisted columns are dropped. Do NOT add
entries — they cause
validation errors.
json
"fields": [
{"name": "ID", "rename": "Dataflow ID"},
{"name": "Display Name", "rename": "Dataflow Name"},
{"name": "Link", "rename": "Dataflow Link"}
]
The minimal field entry is just
{"name": "...", "rename": "..."}
. Do NOT include
,
,
, or
— these cause
DP-0003 Action is improperly configured
errors on the fields format.
PublishToVault (Output Node)
Writes the final data to a Domo dataset.
json
{
"type": "PublishToVault",
"id": "PublishToVault-my-output",
"name": "Output Dataset Name",
"dependsOn": ["last-action-id"],
"settings": {"preferredDatabaseEntityType": "DYNAMIC_TABLE"},
"inputs": ["last-action-id"],
"dataSource": {
"guid": null,
"type": "DataFlow",
"name": "Output Dataset Name",
"description": "",
"cloudId": null
},
"versionChainType": "REPLACE",
"schemaSource": "DATAFLOW",
"partitioned": false,
"tables": [{}]
}
| Field | Description |
|---|
| Array with the final transform action ID |
| Must include the same final transform action ID |
| |
| Name for the output dataset |
| for new outputs, existing UUID for existing output dataset |
| for standard dataflow-managed output |
| (full replace) or |
| |
| |
| |
For new dataflows, omit
entirely. Domo assigns a real output dataset UUID on the first successful run.
Complete Example: Account Summary ETL
This example creates a dataflow that:
- Loads 3 Salesforce datasets (Accounts, Contacts, Opportunities)
- Aggregates contacts per account (count)
- Aggregates opportunities per account (count, total amount, avg amount, expected revenue, avg probability)
- Left joins both aggregations to the accounts table
- Outputs one row per account with all summary metrics
Pipeline Diagram
LoadFromVault(Accounts) ─────────────────────┐
├─ MergeJoin(LEFT) ──┐
LoadFromVault(Opportunities) │ on Id=AccountId │
└─ GroupBy(AccountId) ─────────────────────┘ │
COUNT(Id) → Opportunity Count ├─ MergeJoin(LEFT) ─── PublishToVault
SUM(Amount) → Total Amount │ on Id=AccountId
AVG(Amount) → Avg Amount │
SUM(ExpectedRevenue) → Total Expected Revenue │
AVG(Probability) → Avg Probability │
│
LoadFromVault(Contacts) │
└─ GroupBy(AccountId) ──────────────────────────────────────────┘
COUNT(Id) → Contact Count
Creation Command
bash
community-domo-cli -y dataflows create --body-file sfdc_account_summary_etl.json
Execution
bash
community-domo-cli -y dataflows run <DATAFLOW_ID>
Complete Example: Customer Summary with Rank & Window
This example creates a dataflow that:
- Loads a finance dataset (329,460 rows with customer, date, sales, revenue, cogs)
- Uses a WindowAction to rank orders per customer by date (ROW_NUMBER)
- Aggregates per customer: first order date (MIN), SUM and AVERAGE for sales/revenue/cogs, order count
Pipeline Diagram
LoadFromVault(Mododata | Finance) 329,460 rows
└── WindowAction: ROW_NUMBER partitioned by customer, ordered by date_ymd ASC
└── GroupBy(customer):
MIN(date_ymd) → First Order Date
SUM(sales) → Total Sales
AVG(sales) → Avg Sales
SUM(revenue) → Total Revenue
AVG(revenue) → Avg Revenue
SUM(cogs) → Total COGS
AVG(cogs) → Avg COGS
COUNT(date_ymd)→ Order Count
└── PublishToVault → 104 customer rows
Key JSON Snippets
WindowAction (Rank & Window tile):
json
{
"type": "WindowAction",
"id": "WindowAction-first-order",
"name": "First Order Date per Customer",
"dependsOn": ["LoadFromVault-finance"],
"input": "LoadFromVault-finance",
"groupRules": [
{"column": "customer", "caseSensitive": false}
],
"orderRules": [
{"column": "date_ymd", "caseSensitive": false, "ascending": true}
],
"additions": [
{
"name": "Customer Order Rank",
"operation": {
"type": "RANKING",
"operationType": "ROW_NUMBER",
"column": null,
"defaultValue": null,
"amount": null
}
}
]
}
GroupBy with MIN for first order date:
json
{
"type": "GroupBy",
"id": "GroupBy-customer-summary",
"name": "Customer Aggregations",
"dependsOn": ["WindowAction-first-order"],
"input": "WindowAction-first-order",
"groups": [{"name": "customer"}],
"fields": [
{"name": "First Order Date", "source": "date_ymd", "type": "MIN"},
{"name": "Total Sales", "source": "sales", "type": "SUM"},
{"name": "Avg Sales", "source": "sales", "type": "AVERAGE"},
{"name": "Total Revenue", "source": "revenue", "type": "SUM"},
{"name": "Avg Revenue", "source": "revenue", "type": "AVERAGE"},
{"name": "Total COGS", "source": "cogs", "type": "SUM"},
{"name": "Avg COGS", "source": "cogs", "type": "AVERAGE"},
{"name": "Order Count", "source": "date_ymd", "type": "COUNT_ALL"}
]
}
Result
Output dataset: 104 rows (one per customer) with columns:
,
,
,
,
,
,
,
,
.
Complete Example: Monthly Dept Metrics with Filter & Formula
This example creates a dataflow that:
- Loads a sales dataset (481,643 rows)
- Filters out rows where state = 'Florida'
- Adds a column using
concat(year(), MONTHNAME())
- Aggregates by Year_Month + department + metric_name: SUM and AVERAGE for revenue, store_revenue, web_revenue, mobile_revenue, total_costs, visits
Pipeline Diagram
LoadFromVault(Mododata | Sales) 481,643 rows
└── Filter: state != 'Florida'
└── ExpressionEvaluator: Year_Month = concat(year(date_ymd), MONTHNAME(date_ymd))
└── GroupBy(Year_Month, department, metric_name):
SUM/AVG for revenue, store_revenue, web_revenue,
mobile_revenue, total_costs, visits
└── PublishToVault → 14,057 rows
Key JSON Snippets
Filter (exclude a specific value):
json
{
"type": "Filter",
"id": "Filter-exclude-florida",
"name": "Exclude Florida",
"dependsOn": ["LoadFromVault-sales"],
"input": "LoadFromVault-sales",
"filterList": [
{
"leftField": "state",
"rightField": null,
"rightValue": {"value": "Florida", "type": "STRING"},
"rightExpr": "'Florida'",
"operator": "NE",
"expression": null,
"andFilterList": []
}
]
}
ExpressionEvaluator (date to year-month string):
json
{
"type": "ExpressionEvaluator",
"id": "ExpressionEvaluator-month-trunc",
"name": "Add Month Column",
"dependsOn": ["Filter-exclude-florida"],
"input": "Filter-exclude-florida",
"expressions": [
{
"expression": "concat(year(`date_ymd`),MONTHNAME(`date_ymd`))",
"fieldName": "Year_Month",
"settings": {}
}
]
}
Result
Output: 14,057 rows (1 row per month x department x metric_name, excluding Florida). Granularity reduced from 481K daily rows to 14K monthly aggregated rows.
ETL Error Codes Reference
When a dataflow execution fails, the error object in
contains a
field. Use this table to diagnose:
| Code | Category | Meaning | Typical Fix |
|---|
| Missing input | Required dataset does not exist | Recreate dataset or remove the LoadFromVault tile |
| Missing input | Same as DP-DSNF (alternate code) | Same as above |
| Schema mismatch | Column referenced but not found | Upstream schema changed — update column references |
| Formula error | Syntax error in expression | Fix formula (e.g., missing on CASE statement) |
| Code/model crash | Transform job failure | Check Python script or AI model tile |
| Data volume | Batch Text Generation needs >= 100 rows | Ensure input has enough rows |
| Join key missing | Key column doesn't exist in table | Update join key column names |
| Unknown | No API-level details | Inspect in Domo UI |
Tracing Errors to Specific Tiles
Error objects contain a
map with
(UUID of the failing tile). Match it against
in the dataflow:
python
errors = dataflow.get("lastExecution", {}).get("errors", [])
actions_by_id = {a["id"]: a for a in dataflow.get("actions", [])}
for e in errors:
action_id = e.get("parameters", {}).get("_actionId", "")
tile = actions_by_id.get(action_id, {})
print(f'Error: [{e["code"]}] {e["localizedMessage"]}')
print(f'Tile: "{tile.get("name", "?")}" (type: {tile.get("type", "?")})')
print(f'Property: {e.get("parameters", {}).get("_propertyPath", "")}')
| tile type | What to inspect |
|---|
| — the formula text |
| — the input dataset UUID |
| / — join key column names |
| — column names being selected |
| — filter column |
| — output dataset UUID |
Common Pitfalls
1. / Failures — Wrong Action Type or PublishToVault Structure
means an illegal action type was used (for example
,
,
).
indicates output commit failure and is commonly tied to malformed
payloads.
Root causes: unsupported action type or incomplete/incorrect
shape.
Fix: use supported action types and use this
shape:
json
{
"type": "PublishToVault",
"id": "PublishToVault-my-output",
"name": "Output Dataset Name",
"dependsOn": ["last-action-id"],
"settings": {"preferredDatabaseEntityType": "DYNAMIC_TABLE"},
"inputs": ["last-action-id"],
"dataSource": {"guid": null, "type": "DataFlow", "name": "Output Dataset Name", "description": "", "cloudId": null},
"versionChainType": "REPLACE",
"schemaSource": "DATAFLOW",
"partitioned": false,
"tables": [{}]
}
2. SelectValues — Legacy Failure Mode (Do Not Use)
is a recurring source of failures and should be treated as unsupported for new automation in this skill.
Recommendation: omit
entirely. Set
directly to the final transform node (usually
) and let that output schema flow through.
Legacy reference (for diagnosis only): older payloads used
with keep-only columns (no
, no extra
/
/
).
json
"fields": [
{"name": "ID", "rename": "Dataset ID"},
{"name": "Name", "rename": "Dataset Name"}
]
Columns not listed are dropped. Do NOT add remove entries.
3. Column Name Conflicts in Joins
When joining two datasets that share column names (e.g.,
,
,
), you must use
on the MergeJoin to rename or remove conflicting columns from the right-side dataset. Failing to do this results in ambiguous column names downstream.
4. Action IDs Must Be Unique
Every action in the
array needs a unique
string. Convention is
(e.g.,
"LoadFromVault-b71d89d7-6c08-44ad-a503-ebed046377e0"
), but any unique string works (e.g.,
).
5. dependsOn Must Match step1/step2/input
For
, the
array must contain both
and
action IDs. For
, the
must contain the
action ID. Mismatches will cause the dataflow to fail.
6. GUI Positions Affect the Visual Canvas
The
and
values determine where nodes appear in the Domo Magic ETL visual editor. Space nodes approximately 224px apart horizontally and 192px vertically for a clean layout. Input nodes typically start at
.
When
is set (the modern canvas mode), tile positions are controlled by the
gui.canvases.default.elements
array at the top level — not by the action-level
fields. Always set both to stay consistent. See the "Top-Level
Field" section for the full Section and Tile element schema.
7. Dataflow Creation — Auth and Execution (Updated April 2026)
Auth: handles auth automatically. The underlying
POST /dataprocessing/v1/dataflows
call works with the CLI's configured session. The body
must include
. The created dataflow is NOT in DRAFT state and can be executed immediately — no UI save required.
Outputs: When the body includes
"outputs": [{"dataSourceId": null, "dataSourceName": "...", "versionChainType": "REPLACE"}]
, Domo assigns a real output dataset UUID immediately. The first successful execution creates the actual dataset.
8. Aggregation Type Names Are Not What You'd Expect
The GroupBy
field uses
and
, not
or
. Using
returns a validation error:
{"code":"VALIDATION-DIV","message":"The value is invalid for expected type.","path":"actions[2].fields[0].type","parameters":{"field":"type","type":"AggregateType","rejected":"MINIMUM"}}
Confirmed working types:
,
,
,
. Use these exact strings.
9. Filter rightValue Must Be a Typed Object
The Filter action's
cannot be a plain string. It must be a typed object:
json
// WRONG — returns VALIDATION-DE error
"rightValue": "Florida"
// CORRECT
"rightValue": {"value": "Florida", "type": "STRING"}
Additionally,
must wrap string values in single quotes:
. Both
and
should be set together.
10. TRUNC_MONTH and Other Date Functions Don't Exist
The ExpressionEvaluator does not support
,
, or similar date truncation functions. To get a year-month value, use string concatenation:
concat(year(`date_ymd`), MONTHNAME(`date_ymd`))
Known working functions:
,
,
,
.
11. Dataflows Created via CLI Can Be Executed Immediately (Updated April 2026)
Dataflows created via
community-domo-cli -y dataflows create
are NOT in DRAFT state and
can be run immediately with
community-domo-cli -y dataflows run <ID>
. The
array IS populated on creation when
is passed. No UI save required. Executions return a valid execution ID and run to completion.
12. Use — Not the Java CLI
The legacy Java CLI
may return 500 errors for newly created dataflows. Always use
community-domo-cli -y dataflows run <ID>
— it posts directly to
/dataprocessing/v1/dataflows/{id}/executions
and is reliable.
13. responsibleUserId Is Optional
No need to specify
in the POST body — it defaults to the authenticated user.
14. LoadFromVault Nodes Can Feed Multiple Branches
A single LoadFromVault node can feed multiple downstream branches — just reference its ID in multiple
arrays. This avoids loading the same dataset twice.
15. PublishToVault — Use Only, NOT
The
action uses
to reference its upstream action. Do NOT include an
array — it is not part of the working format and contributes to
commit failures. If
= 0 after creation, the
object is likely missing from the action — PUT the corrected definition to fix.
16. Authentication
handles authentication automatically using the session configured via
. No manual token headers or OAuth exchange needed.
19. All Non-LoadFromVault Actions Require , ,
Every action except
must include these fields or the dataflow may behave unexpectedly in the UI:
json
"disabled": false,
"removeByDefault": false,
"notes": [],
"previewRowLimit": null
additionally requires
and explicit
"schemaModification1": []
and
"schemaModification2": []
(even when empty).
20. Must Be Not
The
field
must be the abbreviated form
. Using
causes validation errors. Other valid values:
,
,
.
21. Always Ask for a Master Dataset Anchor Before Building Lineage ETLs
Before building any dataset lineage ETL, ask: "Is there a master 'My Datasets' or similar list dataset that every output row should be tied back to?" This anchor dataset (typically containing Dataset ID, Name, Link, Owner, etc.) should be loaded as the LEFT side of the final join so all datasets appear in the output — even those with no card/ETL associations (standalone datasets). Missing this anchor means the output only covers datasets that happen to appear in other metadata tables, missing any standalone ones.
17. Use , Not , When You Need the Full Actions Array
community-domo-cli dataflows get
hits the v2 endpoint which may not return the full
array.
community-domo-cli dataflows get-definition
hits
GET /dataprocessing/v1/dataflows/{id}
(no
— that returns 400). Always use
before issuing an update.
18. Replaces the Entire Dataflow Definition
When updating via
community-domo-cli -y dataflows update <ID> --body-file <FILE>
:
- Send the full dataflow object — always start from a fresh , modify it, then pass via .
- Update only saves — it does not run the dataflow. Trigger execution separately with
community-domo-cli -y dataflows run <ID>
.
- Version tracking — each successful update increments
onboardFlowVersion.versionNumber
. The execution response includes to confirm which version ran.
Known Action Types
All action types discovered across existing dataflows in the instance:
| Action Type | Description | Confirmed Working |
|---|
| Input node — loads a Domo dataset | Yes |
| Output node — writes to a Domo dataset | Yes |
| Join two upstream actions on keys | Yes |
| Aggregate with SUM, AVERAGE, MIN, COUNT_ALL, etc. | Yes |
| Rank & Window — ROW_NUMBER, RANK, LAG, LEAD | Yes |
| Legacy select/rename node | Not valid for new flow authoring in this skill; use supported transform chain + |
| Filter rows based on conditions (NE, EQ, NN, etc.) | Yes |
| Add calculated columns / formulas (concat, year, MONTHNAME, DATE) | Yes |
| Deduplicate rows by key columns | Documented (from patterns guide) |
| Change column types or metadata | Seen in existing dataflows |
| Split a column into multiple columns | Seen in existing dataflows |
| Hardcoded/constant input data | Seen in existing dataflows |
Workflow: Creating a New Magic ETL
Pre-Flight Questions (ask before building)
- What are all the input dataset IDs and their column schemas? (query each with
community-domo-cli datasets sql <UUID> --body '{"sql":"SELECT * FROM table LIMIT 2"}'
)
- Is there a master/anchor dataset (e.g., "My Datasets") that every output row should tie back to? If yes, get its UUID — it becomes the LEFT side of the final join.
- What are the exact desired output column names and which input fields map to each?
Build Steps
- Get input dataset schemas —
community-domo-cli datasets sql <UUID> --body '{"sql":"SELECT * FROM table LIMIT 2"}'
on each input dataset
- Build the JSON definition — use the confirmed working action structures from this skill doc
- Add colored Section zones — group related tiles into Section elements in
gui.canvases.default.elements
. Assign each logical branch or processing stage a distinct color. Reparent Tile elements into their sections using and relative coordinates. This step is required for all dataflows with 2+ branches or stages.
- Create —
community-domo-cli -y dataflows create --body-file <FILE>
— works immediately, no UI save needed
- Execute —
community-domo-cli -y dataflows run <DATAFLOW_ID>
- Check status —
community-domo-cli dataflows execution-get <DATAFLOW_ID> <EXEC_ID>
— poll until is or
- On failure — check array in execution response for and , fix the specific action, run
community-domo-cli -y dataflows update <ID> --body-file <FILE>
, then re-run
- Export for debugging —
community-domo-cli dataflows get-definition <DATAFLOW_ID>
returns the full saved definition including any server-assigned GUIDs