Add advanced SQL analytics to streaming cypher rows before returning results to the client
jexp opened this issue · comments
Imagine there was an aggregation function, apoc.agg.analytics("SQL statement", {row-map}, optional SQL parameters) yield map/row
.
By e.g. embedding duckdb JDBC we could create a temporary table/CTE over the inputs and run the provided SQL statement including WINDOW functions, PIVOT etc.
The JDBC driver would ofc, be an optional jar.
We could even have arbitrary JDBC URLs, where duckdb would just be one option that runs in process, to delegate complex analytics to an analytics db.
Or somehow as a subquery / docs?