Fill Operations Feature
Local-first ETL/ELT studio: a drag-and-drop visual pipeline designer
Brought to you by:
slothflowlabs
Originally created by: hawkfish
Originally owned by: SouravRoy-ETL
A common pair of data prep operations are fill down and fill up. Coming in DuckDB 2.0, you can write window functions in extensions, which would let you add these operations in an extension. A simple version of fill down is already included in the demo extension code (it could use a default argument.)
Originally posted by: SouravRoy-ETL
Working on it!
Ticket changed by: SouravRoy-ETL
Originally posted by: SouravRoy-ETL
Done, shipped both directions today.
xf.fill_forwardalready existed, so I just added the siblingxf.fill_backwardnext to it - together they cover the fill down / fill up pair you mentioned.I went with a plain window function over the system DuckDB CLI rather than the 2.0 extension route you suggested:
Reasoning: works on every DuckDB version Duckle currently ships against, single pass, no extra
LOADstep on the user's machine, no extension binary to package. The 2.0 window-function extension is on my radar though - if it ends up materially faster in practice I can swap the implementation behind the same component schema without anything breaking.Both live in the Rows group of the Transforms palette. Required props:
column,orderBy. Optional:partitionBy(fills each group independently). Round-trip test against real DuckDB atcrates/duckdb-engine/tests/execution.rs::fill_backward_propagates_next_non_null.Goes out with the next release. Appreciate the nudge.
Ticket changed by: SouravRoy-ETL
Originally posted by: SouravRoy-ETL
@all-contributors please add @hawkfish for infrastructure, tests and code
Originally posted by: allcontributors[bot]
@SouravRoy-ETL
I've put up a pull request to add @hawkfish! 🎉