faucet-cli 1.7.1

Config-driven CLI runner for faucet-stream pipelines (YAML / JSON, Meltano-style)
Documentation
# Aggregate and enrich order data using embedded DuckDB SQL.
#
# The whole CSV is loaded as a single page (batch_size: 0) so the GROUP BY
# runs across all rows. A reference CSV (countries) is joined at compile time.
#
#   faucet validate cli/examples/csv_to_jsonl_sql.yaml
#   faucet run      cli/examples/csv_to_jsonl_sql.yaml   # requires --features transform-sql,source-csv,sink-jsonl
version: 1
name: csv_to_jsonl_sql

pipeline:
  source:
    type: csv
    config:
      path: cli/examples/data/orders.csv
      has_header: true
      batch_size: 0          # whole file as one page → global GROUP BY

  transforms:
    - type: sql
      config:
        query: |
          SELECT c.country,
                 COUNT(*)                     AS order_count,
                 SUM(CAST(o.amount AS DOUBLE)) AS total_amount
          FROM   batch o
          LEFT JOIN countries c ON o.country_code = c.code
          GROUP BY c.country
          ORDER BY c.country
        relations:
          - name: countries
            source:
              type: csv
              path: cli/examples/data/countries.csv
              has_header: true

  sink:
    type: jsonl
    config:
      path: /tmp/faucet_sql_demo.jsonl