A lightweight data-pipeline compiler that turns .flow scripts into runnable Python (Pandas) pipelines.
# from the project root
pip install .pip install -e .After install, the
flowccommand becomes available globally.
examples/monthly_revenue.flow
load "datasets/sales.csv" as sales
pipeline monthly_revenue:
sales |> filter region == "APAC"
|> group_by month
|> sum amount as revenue
|> emit to "datasets/output_filter_sum.csv"
flowc examples/monthly_revenue.flowExpected:
- A
generated_pipeline.pyfile is created/overwritten. - Output CSV written to the path declared in
emit.
flowc <file.flow> [--verbose] [--no-run]--verbose— prints internal compiler stages and extra diagnostics.--no-run— generatesgenerated_pipeline.pybut skips executing it.
Examples:
flowc examples/join_pipeline.flow --verbose
flowc examples/monthly_revenue.flow --no-runload "<csv_path>" as <alias>
pipeline <name>:
<alias> |> filter <expr>
|> group_by <column>
|> sum <column> [as <alias>]
|> average <column> [as <alias>]
|> dropduplicates [<column>]
|> sortby <column> [desc]
|> rename <old> to <new>
|> select col1, col2, ...
|> join <other_alias> on <column>
|> ensure <condition>
|> emit to "<csv_output_path>"
Notes:
- Expressions in
filteruse Pandas query syntax (e.g.,amount > 1000 and region == "APAC"). group_byfollowed bysum/averagewill aggregate and reset index automatically.selectaccepts comma-separated column names.
examples/join_pipeline.flow
load "datasets/employees.csv" as employees
load "datasets/customers.csv" as customers
pipeline join_pipeline:
employees |> join customers on id
|> select id, name, city
|> emit to "datasets/output_join.csv"
generated_pipeline.py— auto-generated Python.- Output CSVs at paths defined by
emit.
“Column 'X' not found”
- The semantic checker validates columns before running. Check the CSV header.
- The error may include a suggestion (closest match).
“Skipped execution due to incomplete or circular dependencies.”
- One pipeline depends on the output of another that wasn’t generated.
- Fix pipeline order or remove circular references.
Windows paths in load/emit
- Prefer forward slashes or raw strings in CSV paths:
datasets/sales.csv.
Nothing happens on run
- Ensure your script contains an
emitstep. - Run with
--verboseto see internal steps.
- Compiler version: v1.2.3 (Final Build)
- See
docs/CHANGELOG.mdanddocs/test_results.mdfor history and coverage.