neo4j-contrib / neo4j-apoc-procedures

Awesome Procedures On Cypher for Neo4j - codenamed "apoc"                     If you like it, please ★ above ⇧            

Home Page:https://neo4j.com/labs/apoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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?