Job Instructions
Each job in a workflow has instructions that define how it fetches, loads, transforms, or charges data. These pages list the exact keys, accepted values, and examples for each kind of instructions.
To build jobs in the app, see Pipelines. To connect jobs to a shared template and adopt its updates, see Building and editing workflows.
Instruction kinds
| Kind | Job | Purpose | Main output | Use it for | Reference |
|---|---|---|---|---|---|
extract | Extract job | Fetch source data from APIs, databases, object stores, and files. | Staged documents with metadata and optional request outputs. | Authentication, pagination, matrix expansion, request outputs, source metadata. | Extractor instructions |
load | Load job | Map fields of the fetched documents into a typed table. | One loaded table with a row identity. | Source IDs, exact amounts, source timestamps, and currencies. | Loader instructions |
transform | Transform job | Model one charge-ready table with DuckDB SQL. | One typed transformed table. | Grain decisions, joins, deduplication, and period alignment. | Transformer instructions |
charge | Charge job | Calculate and publish one cube output. | Charged rows. | Exact arithmetic, pricing, allocation, measures, dimensions, moments, and labels. | Charger instructions |
Two more pages describe the expression language:
Choose the business grain before the Charge job. The Transform job must produce one row for each input grain. The Charge job can then group, price, adjust, and allocate without repairing ambiguous source rows.
Rendering and expression support
Each kind accepts dynamic values in a different way.
| Kind | Dynamic values | Limits |
|---|---|---|
| Extractor | Template expressions in selected scalar fields. The context has inputs, earlier extractor outputs, the current matrix, and request-local pagination state. | There is no standalone Bearer authentication type. Use OAuth2, JWT, or an HTTP Authorization header for token-style APIs. |
| Loader | Typed literal defaults or declared server parameters. | targetRelation and sourceField are static. There is no dynamic relation expression. |
| Transformer | Named typed values such as :billing_month. SQL can use {{loaded}}, {{transformed}}, and {{charged}}. | Inputs cannot change SQL structure. Every table that the SQL reads needs an explicit typed origin. |
| Charger | The whole content is rendered with input-scoped template expressions before parsing. | Use input-scoped expressions such as ${{ inputs.start }} or ${{ inputs.billing_month }}. Do not use extractor-only concepts such as outputs and matrix. |
For syntax, context, operators, functions, and callbacks, see Template expressions and functions.
Inputs
Inputs let the same instructions run for different months, customers, providers, credentials, tables, or outputs.
| Key | Applies to | Meaning |
|---|---|---|
name | Extractor, transformer, charger | Input key. Extractor and charger names must start with a lowercase letter and may contain lowercase letters, numbers, _, and -. Transformer inputs are SQL placeholder names. |
type | Extractor, charger | String, Boolean, Numeric, DateTime, or SecretRef. Transformer inputs have a name only: supply a value that matches the SQL placeholder. |
default | Extractor, charger | Value used when the run does not provide one. Do not set raw secret defaults. |
The instructions of a job define which inputs it has. The values come from instruction defaults, workflow input, job input, workflow input groups, schedule input, and run input. For the resolution order, see Inputs and precedence.
A job that is connected to a shared template uses new shared input declarations only after you accept that update for the job.
Use SecretRef for credentials. The instructions reference the input, for example ${{ inputs.client_secret }}, and the secret value is supplied when the job runs. See Secrets.
How to choose where logic belongs
| Need | Put it here |
|---|---|
| Fetch every customer, region, subscription, invoice, or page. | Extractor matrix, pagination, and outputs. |
| Keep raw source values for audit or repair. | Loader columns. |
| Decide customer ownership, normalize source facts, or deduplicate rows. | Transformer SQL. |
| Calculate exact products, ratios, prices, adjustments, or final group allocation. | Charger and charging rules. |
| Map the final fact table to cube dimensions, moments, and measures. | Charger. |
| Make a reusable reporting field available to many spaces. | A shared reporting field on the cube. See Reporting fields. |
Authoring checklist
Before you use instructions in production, check that:
- Input names are the same in the workflow, job, schedule, run, and instructions.
- Secret values are
SecretRefinputs or secret bindings, not raw strings. - Extractor Preview proves authentication, pagination, matrix expansion, selectors, decompression, and retry behavior.
- Every Loader source binding names one request of a direct Extractor dependency.
- Loader mappings keep the source IDs, source period fields, amounts, currencies, quantities, and metadata that reconciliation needs.
- Transformer SQL produces a charge-ready fact table with one row per intended reporting grain.
- The Transformer publishes one table with explicit typed origins and valid assertions.
- Charge arithmetic reads exact integers and decimals, not approximate values.
- Pricing, adjustments, commercial periods, and target allocation are complete before activation.
- Charger
moment,dimensions,measures,unit,labels, andfact.tableare deliberate. - Reporting fields use the correct scope. See Field scopes and promotion.