Zum Inhalt springen
Skillpedia
Datenbanken18k · #10632

write-pipeline

Was er macht

Dieser Skill erklärt, wie du in Windmill eine Datenpipeline aus getrennten Skripten baust, die über gemeinsamen Speicher und Trigger verbunden sind, statt eines einzigen Flows. Er ist für Menschen gedacht, die Daten Schritt für Schritt verschieben und umwandeln.

Wann du ihn nutzt

  • ✓Wenn du Daten über mehrere Schritte in Windmill aufnehmen, umwandeln oder materialisieren willst.
  • ✓Wenn du eine Datenpipeline statt eines einzelnen Flows willst.
  • ✓Wenn eine Tabelle von einem DuckDB-Skript erzeugt werden soll, das in eine DuckLake-Tabelle schreibt.

Link zum Skill

https://github.com/windmill-labs/windmill/blob/main/system_prompts/auto-generated/skills/write-pipeline/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/windmill-labs/windmill/blob/main/system_prompts/auto-generated/skills/write-pipeline/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Baue eine Windmill-Pipeline, die unsere Verkaufs-CSV in eine Tabelle lädt und danach eine monatliche Übersichtstabelle erstellt.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Skill lässt deinen Agenten kleine Skripte schreiben, jeweils mit Hinweisen, was sie lesen und schreiben. So verbindet die Windmill-Pipeline-Ansicht sie miteinander.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Data pipeline authoring

A data pipeline is NOT a flow. A flow is one runnable that orchestrates steps internally. A data pipeline is a set of independent scripts, each deployed on its own, that form a DAG by reading and writing shared storage assets (DuckLake tables, data tables, S3 objects, volumes, resources) and by declaring execution triggers. The pipeline is visualized and edited at /pipeline/<folder>; every node is a normal workspace script that happens to carry pipeline annotations. When the user asks for a "data pipeline" (or to "ingest / transform / materialize" data across steps), build pipeline-annotated scripts — do NOT build a flow.

Default to DuckDB + DuckLake

A pipeline node that produces a table should almost always be a duckdb node that materializes its output into a DuckLake table with -- materialize ducklake://<name>/<table> (in a DuckDB node the annotation uses SQL -- comment syntax; write the body as a bare SELECT and let the runtime do the write). DuckLake is the default lakehouse store for pipelines and is the shape the pipeline editor is built around, so prefer it unless the work specifically calls for something else:

  • postgresql / data tables — only for row-level, OLTP-style mutations against an existing Postgres data table (frequent single-row upserts/updates, transactional reads that an app queries live).
  • bun / python3 — only for work that doesn't map to SQL: calling an external API, wrangling files, arbitrary glue. When such a node produces tabular data for downstream steps, write it straight into DuckLake (or a data table) from the same script — see "Ingesting from Python / TypeScript" below — rather than inventing a parallel store.

Do not spread a pipeline across postgres, S3, and DuckLake when one DuckLake lake would do; a consistent DuckLake lakehouse is the goal.

Ingesting from Python / TypeScript

A node that fetches data in code (an API, a SaaS export, a scraper) writes the rows directly into their DuckLake table with wmill.ducklake(), or into a data table with wmill.datatable(). DuckLake already stores every table as parquet files in the workspace object storage, so never stage the raw payload first — no intermediate JSON / CSV / parquet file in S3 and no second "load the raw file" node. One ingestion node, one table.

Pass the rows as a query argument (a list of dicts / array of objects is sent as JSON) and let SQL unnest them; declare the column types so the table gets a real schema:

# pipeline
# on schedule
import wmill

def main():
    rows = fetch_charges()  # list[dict]
    lake = wmill.ducklake()
    lake.query("""
        CREATE OR REPLACE TABLE stripe_charges AS
        SELECT unnest(from_json($rows, '[{"id":"VARCHAR","amount":"BIGINT","created":"BIGINT"}]'), recursive := true)
    """, rows=rows).fetch()
// pipeline
// on schedule
import * as wmill from "windmill-client"

export async function main() {
  const rows = await fetchCharges()
  const lake = wmill.ducklake()
  await lake`CREATE OR REPLACE TABLE stripe_charges AS
    SELECT unnest(from_json(${rows}, '[{"id":"VARCHAR","amount":"BIGINT","created":"BIGINT"}]'), recursive := true)`.fetch()
}
  • Use INSERT INTO <table> SELECT ... instead of CREATE OR REPLACE to append (an incremental pull), with a one-time CREATE TABLE IF NOT EXISTS first.
  • Assign the client to a variable (lake = wmill.ducklake()) and keep the SQL a string literal (Python) or a template without sql.raw (TS): that is what lets the graph record the node's write to ducklake://main/<table>. A chained wmill.ducklake().query(...) or SQL built in a variable records no output, so the downstream edge never forms.
  • wmill.ducklake("<name>") targets a non-default catalog; wmill.datatable("<name>") writes a Postgres data table the same way (Python db.query(sql, *args) with $1 placeholders, TS the same template form) — use it only when the data belongs in Postgres (see above).
  • The downstream node triggers on the table itself: -- on ducklake://main/stripe_charges.

Storage prerequisites

A DuckLake pipeline only runs once the workspace has object storage (S3 / Azure Blob / GCS) and a DuckLake catalog configured — DuckLake tables and s3:// assets can't be materialized or read without it. Check which DuckLake catalogs the workspace has before you build. wmill ducklake list lists them. Drafting the annotated scripts does not

Häufige Fragen

Ist eine Datenpipeline dasselbe wie ein Flow?

Nein. Eine Pipeline besteht aus getrennten Skripten, die über gemeinsame Tabellen verbunden sind, während ein Flow seine Schritte in einem einzigen ausführbaren Element abarbeitet.

Was ist DuckLake?

Es ist der Lakehouse-Tabellenspeicher, den der Skill für die Ausgabe der Pipeline standardmäßig nutzt.

Wo sehe ich die Pipeline?

Windmill zeigt sie im Pipeline-Editor für den Ordner, der die Skripte enthält.

Details

Originalbeschreibung des Autors

MUST use when creating or modifying a data pipeline, a set of scripts marked `pipeline` and wired together by `on` / `materialize` annotations.

repo: windmill-labs/windmill

Beliebtheit

GitHub-Sterne
18k
Platz im Ranking
#10632
Lizenz
—
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills