frappe / insights

Open source analytics / business intelligence tool (BI)
https://frappe.io/insights
GNU Affero General Public License v3.0
390 stars 187 forks source link

chore: merge `develop` into `main` #194

Closed nextchamp-saqib closed 8 months ago

nextchamp-saqib commented 8 months ago

New Query Builder

The classic & visual query builders were not new-user friendly. The user had to do a lot of guesswork to get the query right. Query Builder needs to be intelligent to help reduce the manual steps required to build a query for eg. inferring joins, groupings, aggregations, etc.

The new query builder is designed to improve the query-building experience. The idea was to reduce the number of steps by automatically guessing the joins and setting proper defaults wherever possible while still allowing the user to customize the query.

Major Improvements:

The combination of these changes has reduced the number of steps required to build a query significantly.

https://github.com/frappe/insights/assets/25369014/cd4977c5-1120-4a79-9842-4a6a9b208944

Other Improvements:

Managing Table Relationships

Relationships are important for the query builder to infer joins between tables. There wasn't a way to add/edit/remove relationships between tables. The new RelationshipEditor allows the user to manage relationships between tables.

Note. Relationships are automatically imported if the data source is a Frappe app's database.

https://github.com/frappe/insights/assets/25369014/95489d75-e8d2-4bf1-9171-aad7a268efdc

Filtering, Sorting & Pagination in Table Chart

The table chart now supports filtering, sorting & pagination. This was made possible by using one of the best datatable libraries - tanstack-table. The table chart is now more powerful and can be used to show large datasets.

https://github.com/frappe/insights/assets/25369014/6d9cf444-9611-4237-9ef9-036a6908669e

Pivot Table Chart

A new chart type PivotTable is added which allows the user to select rows, columns, values and to create a pivot table. The table is rendered using tanstack-table making filtering, sorting & pagination possible.

https://github.com/frappe/insights/assets/25369014/a63e3a4b-8ee3-4475-8859-0d7af170758d

Other Minor Improvements