Quickstart
You’ll need an editor account (an admin invites you)
and a PostgreSQL database Flux can reach. The example uses an orders table with id,
customer_id, status, amount and currency; use any table you have.
1. Connect the database
Section titled “1. Connect the database”- Open Connections and press New connection.
- Choose PostgreSQL, give it the key
shop, and fill in host, database, username and password. - Press Test connection to check Flux can reach the database and sign in.
- Press Create connection.
The password is encrypted as soon as it’s saved; nobody can read it back, including you.
2. Build the pipeline
Section titled “2. Build the pipeline”- Open Pipelines, type “Paid orders” under New pipeline and press Create.
- From the palette on the left add an Extract node. In its settings choose the
connection
shopand the objectpublic.orders. - Add a Filter and connect the extract’s output to it (drag from the node’s right
edge to the filter). Set the condition to
status = 'paid'. - Add a Calculate and connect the filter to it. Add a field
amount_centswith the formulaROUND(amount * 100). - Add a Target, connect it, and set kind dataset, dataset
paid_ordersand keyid.
Select any node and press Preview output to see sample rows and column types at that step. Problems show on the node as you go, naming the field to fix.
3. Activate and run
Section titled “3. Activate and run”- Press Save & activate. Flux validates the pipeline and makes this version the one that runs.
- Press Run. The run page shows each node’s progress live, then succeeded with the rows written.
4. Use the dataset
Section titled “4. Use the dataset”Open Datasets → paid_orders. Look up an order by id, scan a range, or run SQL:
SELECT currency, count(*) AS orders, sum(amount_cents) / 100.0 AS totalFROM paid_orders GROUP BY currency ORDER BY total DESCFrom an application, create an API key limited to
paid_orders and call:
curl -H "Authorization: Bearer $FLUX_KEY" \ "https://flux.nasterra.com/api/datasets/paid_orders/get?id=1042"- Run it every morning: Schedule and trigger pipelines.
- Hear when it fails: notifications.
- Every node and its settings: Node types.