Docs
Sign in

Transforms

A transform is a saved SQL query that reads your landing tables and writes the result to a table in the refined zone. Transforms are how raw data becomes clean, joined, ready-to-use data, and you can build one visually, in SQL, or by describing it in plain language.

Screenshot to add: The Transforms page with the Operational and Causal surfaces tabs, the search and status filter, and a table of transforms.

The subtitle reads "Define and manage Landing → Refined transforms. Run the full pipeline from the Operations page." The Operations page is Pipeline Admin. Without an open project the page shows "No project selected — choose one from the header".

The Transforms page

The page has two tabs, each with a count.

TabWhat it holds
OperationalThe transforms you write and manage
Causal surfacesTransforms the Analysis Agent generated to feed signal detection (see Causal surfaces)

If the pipeline worker is not responding, an amber Pipeline worker degraded banner appears at the top: "Pipeline runs and signal detection will queue until it recovers." If a transform fails to activate, a red Transform activation failed banner explains why in one sentence and asks you to edit the SQL in the editor. Click ✕ to dismiss it.

While a pipeline run is in progress, a progress panel appears under the header. When a run finishes without firing any signals, the panel stays and suggests you set up Signal Specs.

Operational tab

With no transforms, the page says "No operational transforms yet". Otherwise you get a Search transforms… box, a status filter (All statuses, Draft, Active, Deprecated) and a table.

ColumnWhat it shows
NameThe transform name, and its description under it. Click to open the editor
Output TableThe refined table it writes, or not set
Statusdraft, active or deprecated
Last RunA status icon and how long ago it ran
ActionsA ▶ run button and a ⋮ menu

If nothing matches your filters, the page says "No transforms match your filters". Failed table loads show "Failed to load transforms" with Retry.

Statuses

StatusMeaning
DraftNot live yet. It cannot be run until you set it to active
ActiveReady to use. It can be run, and is part of the pipeline
DeprecatedRetired. You can bring it back with Reactivate

A transform must be active to be run: the run button says "Set status to active before running" otherwise.

Row actions

The ⋮ menu on a row offers:

  • View detail, which opens the detail page.
  • Status, with draft, active and deprecated. The current one is ticked.
  • Delete, which asks you to confirm and warns "This cannot be undone."

Several at once

Tick the checkboxes at the left of the rows, or the box in the header to select every row shown. A bar appears with the count, Activate all (sets them to active), Pause all (sets them back to draft) and Clear (deselects them). A progress message such as Updating 2/5… shows while they are processed.

Create a transform

  1. Click New Transform

    The button is at the top right of the Operational tab.

  2. Fill in the form

    • Name (required), a snake_case identifier such as customer_ltv_refined.
    • Output Table, such as customer_ltv. It is written to the refined zone.
    • Description, for example "Calculates customer lifetime value from order history".
    • SQL (required). SELECT statements only. It starts with a placeholder query for you to replace.
  3. Create

    Click Create transform. The new transform is saved as a draft and opens in the editor on the SQL tab.

  4. Activate

    When the SQL is right, set the status to active so it runs with the pipeline.

The editor

Click a transform to open the editor. A Detail link at the top left goes back to the detail page, and the transform's name is shown with a • when there are unsaved changes.

The toolbar has:

  • Three tabs: Visual, SQL and Ask. See below.
  • Dry Run, which runs a preview query and shows the first 100 rows without changing anything.
  • Save. It reads Saving… while it works and Saved once done. It is off when nothing has changed.

Errors found when saving appear in a red bar under the toolbar. Click the ✕ to clear them.

A table catalog panel sits at the right edge and opens by default on the SQL tab. Use it to find table and column names without leaving the editor. It has a Search tables… box, and you can copy a name from it.

Visual tab

Build the query by dragging nodes onto a canvas and connecting them, left to right. The palette on the left has seven node types.

NodeWhat it does
SourcePicks a landing table to read
ProjectChooses which columns to keep
FilterKeeps rows that match a WHERE condition, such as status = 'active' AND amount > 0
DerivedAdds a computed column. You give the column name and an expression such as amount / NULLIF(quantity, 0)
JoinMerges two streams, as an INNER, LEFT, RIGHT or FULL join, with one or more ON conditions
AggregateGroups rows and applies functions such as COUNT, COUNT DISTINCT and others to columns, each with an AS alias
OutputNames the result table

Click a node to edit its properties in the panel on the right, and use its Delete node button to remove it. The editor turns the graph into SQL for you. A typical flow is Source → Project / Filter / Join / Aggregate → Output.

SQL tab

A code editor for the query itself. If you edit the SQL by hand, a note warns "SQL has manual edits. Visual graph may not match." Hand-written SQL and the visual graph can drift apart, so pick one way to edit a given transform.

Ask tab

Describe what you want in plain language. The box says "Describe the transform you want in plain language. APEX will generate the SQL and visual graph.", with an example, "Total revenue per supplier from purchase_order_line".

  1. Type your request and click Send.
  2. The answer appears with an explanation, and a candidate SQL and graph on the right panel. Expand SQL preview to read the query.
  3. Click Accept to use it, which fills the Visual and SQL tabs. Or type a follow-up to refine it.

You can discard the conversation, after a confirmation, to start over.

Detail page

The detail page summarises a transform. It shows the name, its status, the SQL and a Metadata section with the Output table (or Not set), Materialization, Created and Last updated. Materialization reads Table (overwrite): each run replaces the output table.

At the top are a run button, an editor button ("Open visual / SQL editor") and a delete button. Running needs an output table and an active status: "Set an output table before running" and "Set status to active before running" explain what is missing. If the last run failed, a Last run failed box shows the error. A transform that has never run says Never run.

Causal surfaces

The Causal surfaces tab holds transforms generated by the Analysis Agent to prepare data for signal detection. They are grouped by type:

GroupPurpose
Temporal lag (TYPE3)Input for lag analysis: an event flag against a metric over time
Event cohorts (TYPE2a)Who was affected by each event
Pre / post impact (TYPE2b)How a metric changed for each entity around events
Needs attentionDeprecated, failed or draft surfaces. Check their SQL

Each group is a table with Name, Source → Target (or Event table), Lag, Status, Last run and Actions.

Locking

The agent can regenerate these transforms on later runs. To keep your own edits, lock the transform:

  • Saving an agent-generated transform locks it automatically, and the editor says so: "Saving will lock it — the Analysis Agent will not regenerate it on future runs." The button reads Save and lock.
  • A locked transform shows a lock icon with the hint "Edited by user · agent will not regenerate".
  • ⋮ → Unlock lets the agent regenerate it again. ⋮ → Lock locks it without editing.
  • ⋮ → Reactivate brings a deprecated surface back.