Langsung ke konten
Skillpedia
Database18k Β· #10632

write-pipeline

Fungsinya

Skill ini menjelaskan cara membangun pipeline data di Windmill dari skrip terpisah yang dihubungkan oleh penyimpanan bersama dan pemicu, bukan satu flow. Skill ini untuk orang yang memindahkan dan mengubah data langkah demi langkah.

Kapan dipakai

  • βœ“Saat Anda ingin mengimpor, mengubah, atau mematerialisasi data di beberapa langkah di Windmill.
  • βœ“Saat Anda meminta pipeline data, bukan satu flow tunggal.
  • βœ“Saat tabel harus dihasilkan oleh skrip DuckDB yang menulis ke tabel DuckLake.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/windmill-labs/windmill/blob/main/system_prompts/auto-generated/skills/write-pipeline/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBangun pipeline Windmill yang memuat CSV penjualan kami ke sebuah tabel, lalu membuat tabel ringkasan bulanan.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill meminta agent menulis skrip kecil, masing-masing diberi catatan yang menyebutkan apa yang dibaca dan ditulisnya, sehingga tampilan pipeline Windmill menghubungkannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Apakah pipeline sama dengan flow?

Tidak. Pipeline adalah sekumpulan skrip terpisah yang dihubungkan tabel bersama, sedangkan flow menjalankan langkah-langkahnya di dalam satu runnable.

Apa itu DuckLake?

Penyimpanan tabel lakehouse yang dipakai skill sebagai bawaan untuk output pipeline.

Di mana saya melihat pipeline?

Windmill menampilkannya di editor pipeline untuk folder yang berisi skrip.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
18k
Peringkat
#10632
Lisensi
β€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa