ibis
ibis copied to clipboard
feat(api): Add support for Recursive Common Table Expressions (CTE's)
Please add support for Recursive CTE's in Ibis as a way to interact with hierarchical data using Python.
Please see repo: https://github.com/prmoore77/ibis-olap-aggregation - for an example where we use Recursive CTEs to manually create table structures that allow aggregation of fact data along a dimensional hierarchy.
This can help with Business Intelligence workloads in Ibis that need to aggregate data hierarchically. The business problem (and solving SQL) is detailed in this medium article.
Thank you!
If it helps - I converted the "HierarchyDimension" class to now use SQLAlchemy Core for the Recursive CTE (per suggestion from @cpcloud) - see: https://github.com/prmoore77/ibis-olap-aggregation/blob/main/classes/hierarchy_dimension_table.py
This may help for the ibis api feature...
Closing this out for now. This is an interesting idea, but it needs some API design work.