Skip to content

What a pipeline is

The question for this lesson: you have a CSV of customers, and you want Clinker to flag the active ones and tag each as “gold” or “standard”. Before you write anything, what is a pipeline, and how do you read one?

  • Describe the four-part mental model of a pipeline and use it to predict what a pipeline does.
  • Name the three node types in a basic pipeline and what each one is for.
  • Run a real pipeline and read its output.
🌱 New here? — YAML

YAML is a plain-text format for structured data. Indentation (spaces, never tabs) shows what belongs to what. A line like name: customers is a key and a value; a line starting with - is a list item. That’s nearly everything you need here.

Every Clinker pipeline does the same three things, in order:

  1. A source reads your data and turns each row into a record.
  2. One or more nodes change those records. A transform computes new fields, a route splits them, an aggregate groups them.
  3. An output writes the records back out to a file.

That’s the whole notional machine:

sources produce records → nodes transform/route/aggregate them → outputs write them. Anything that goes wrong with a row can be sent to a dead-letter queue instead of stopping the job.

You can predict what almost any pipeline does by tracing one record through that chain. You never need to know how Clinker does it inside, only what each node does.

Here is a complete, working pipeline. It reads customers, keeps a marker for the active ones, tags each by lifetime value, and writes the result.

pipeline.yaml // editable

Trace one record all the way through and you can predict the file before you open it. Later you’ll learn to validate a pipeline before running it, so you can check its structure without processing any data.

  • type: sourcetype: csv: read a CSV. schema: declares the columns and their types. Clinker does not guess types from the file; you state them.
  • type: transformcxl:: run a small expression over every record. emit is_active = … adds a new column. (That little language is CXL, the focus of the next lesson.)
  • type: output: write the records to a file. Each node names the node it reads from with input:, which is how the chain is wired.

// quick check

In the mental model, what is a 'record'?

Change the final_flag transform so the gold threshold is 5000 instead of 10000. Predict which customers become “gold”, then reveal the expected result and check.