Guide Guide
Outputs and delivery
The job is finished when the result is in front of the person who needs it, in the form they expect, so delivery is part of the pipeline. An output says what to write, from which step, where, and how. “Nothing is written until you add an output.” A pipeline can have any number of outputs, each from any step.
Outputs are written only by a run, and only after every check that stops the run has passed. A file is written completely or not at all: a half-written file is never left behind.
Adding an output#
Under Outputs in the recipe, choose Add output, or use Add an output… in the command palette, or Add output from here on a step’s menu. Then choose what to write:
| Output | Writes |
|---|---|
| CSV file | With full control of the delimiter, quoting, encoding (UTF-8, UTF-8 with a byte-order mark for Excel, Windows-1252, UTF-16 …), line endings and compression |
| Excel workbook | Typed cells, styled, one or more sheets (below) |
| Excel template fill | Your own workbook, filled in (below) |
| Parquet file, JSON file, XML file, Fixed-width text | With the options each format needs: row groups and partitions for Parquet, one array or one row per line for JSON, elements and attributes for XML, field widths for fixed-width |
| SQLite database file, DuckDB database file | A table in a database file |
| Database table | A table in PostgreSQL, MySQL, SQLite or DuckDB, in one transaction (below) |
| Report (PDF or HTML page) | A report built from the run report, text, tables and pinned charts |
| Message (email, Slack, Teams, web request) | Sent after the files are written; see Split one result and send each piece |
| Snapshot | A kept copy of the table, for later runs or audits |
From chooses the step whose table is written. The file name can include variables: Insert a variable into the name adds the run date, a parameter or, for a split output, the piece’s value. A relative path is inside the project folder, unless it starts with / or an @alias/.
The quickest way to get one table out, without adding an output, is Export… (⇧⌘S / Ctrl+Shift+S), which writes the table in the grid once.
Excel, done properly#
The Look of an Excel workbook output: number formats per column (or “As the column’s type”), widths (“Fit each column to its contents”), a header fill and style, frozen panes, filter buttons or an Excel table with a table style, a totals row, conditional formats (colour scales, data bars, top or bottom values, duplicate values, a formula), printing options, and protecting the sheet without a password. Without any of it the workbook still has typed cells: “dates stay dates, identifiers and long numbers stay text. The header row is frozen and has filters.”
- Add a sheet from a step writes several tables into one workbook, each on its own sheet.
- Text columns: identifiers and long digit strings are always written as text; add columns to force more.
- More rows than a sheet holds: beyond 1,048,575 rows, either Split across sheets (“the rest go on more sheets, each with its header, and the run warns”) or Stop the run.
Template fill#
Excel template fill writes into an existing workbook. “The template itself is never changed: each run writes a filled copy.” Its formulas, pivot tables, charts, formatting and macros stay, and Recalculate formulas and refresh pivot tables when the workbook is opened makes them refresh on open.
- Give the Template (in the project, an
@alias/path, or a full path) and choose Look inside. - For each table to fill, choose the step it comes From and where it goes Into: an Excel table, a named range, or a sheet’s top-left cell. A single value, such as the report month, can go into a named cell.
- Choose the columns to write, and what to do with Old rows below the new data: Clear them (the default) or Keep what is below. Copy the first row’s formatting and formula columns down extends formatted rows and formula columns to the new rows.
- A template with macros keeps them only when the copy is saved as
.xlsm; the editor offers Name it .xlsm.
Split and distribute#
Split and distribute turns one output into one file, sheet or filled copy per value of a column: per region, per manager, per client. The file name follows a pattern such as Sales_{Region}_{month}.xlsx. At most caps the number of pieces, as a guard against splitting by the wrong column. Send each piece where a mapping table says sends each piece to its own folder or person from a mapping table. The full steps are in Split one result and send each piece.
Write rules#
Every file output has Write rules:
| Rule | Choices |
|---|---|
| Each run | Replace the file; A new dated file each run; Add the rows to the file; Update or insert by key (choose the key columns); Replace one period only (choose the period column and which period: this run’s, or the periods in the new rows) |
| Versions | Keep the last N versions of the file; any can be restored with Versions and restore… on the output’s menu. The current file is kept as a version before a restore, so a restore can be undone |
| When someone else changed the file | Stop and leave it untouched, or overwrite it. The app will not overwrite a file someone changed since the last run unless told to |
| When the file is open in another program | Try again (so many times, so many seconds apart), Write a copy alongside, or Stop the run with nothing written |
| When the result has no rows | Write it with the header only, or Do not write it |
| When the output is written | Every run that passes its checks, or Only when no check warned |
Create the folder when it is missing creates the target folder. Preview what the outputs write (in the Outputs section or the command palette) lists every file each output would write and what happens to files already there, before anything is written. Write now… on an output’s menu writes that output from the current data, recorded as a run.
Databases#
Add output: Database table (PostgreSQL, MySQL, SQLite, DuckDB) writes a table. Database connections are read-only until you allow writing (“Only connections that allow writing are offered”): Allow writing on the connection, then this output switches writing on for itself. Choose the table, the Mode (create, append, update or insert by key, replace, or replace one period) and what to do When the table exists. Before anything is written, What it will write shows the columns, a few of the rows added and deleted, and the table before and after. “Each run writes the table in one transaction, after the checks pass.” SQL before and SQL after run inside the same transaction.
Reports#
Add output: Report (PDF or HTML page) writes a report each run: it starts with the run report (what ran, what was checked, what changed since last time, the pinned charts and the outputs), and you add text, tables and pinned charts after it. Pin a chart from the Chart tab (Pin this chart to the pipeline) and it redraws from each run’s own rows.
Share the run report as a page or PDF… writes one run’s report once: an HTML page “that opens in any browser, offline; nothing in it runs”, or a PDF, ready to forward.
Held messages#
A message output with Review before sending: hold every message until someone approves it holds its messages after each run. “Held messages wait with their run: release them as they are, or discard them with a note. Files are written either way.” Review held messages… (command palette, or Held messages… in the message editor) lists them for the open pipeline, or for a run open in the Runs view: Send releases them as they are, and Discard… asks “Why are they discarded?”, which is “Kept with the run, for whoever looks at it later.” A workflow’s review gate holds the whole delivery instead; see Review gates.
If an older engine or runner cannot release or discard the messages, the dialog says so: it lists them from the run record only, and “Nothing is sent or dropped until an up-to-date app or runner releases them.”
Dry runs#
Run options › Dry run does everything except deliver. Files are written to a sandbox folder “under the same names and folders”, database writes are rolled back, and every message goes only to you. Show what the last dry run would do lists what a real run would have written and where it would have stopped.
When it goes wrong#
| You see | What happened and what to do |
|---|---|
| “Could not write Monthly_Report.xlsx. The file is open in Excel. Nothing was written; the old file is unchanged.” | The open-file rule is Stop the run. Close the file and Try again, or Write a copy alongside |
| The run refuses to replace a workbook someone edited | The changed-file rule protects their edit. Look at the file, then allow overwriting for this output if that is what you want |
| “The name is the same every run, so the second run would find its file already there.” | With A new dated file each run or history in mind, put the run date or a date parameter in the name |
| A message was not sent but the files were written | Messages are sent after every file is written. If Review before sending is on, they are held: send or discard them from Review held messages… |
See also#
- Split one result and send each piece.
- Workflows and the background agent: delivery after a review gate.