Warehouse support for Grid presentations
Issue #578
closed
Add views into warehouse to use for grid presentations
Comments (3)
-
reporter -
reporter cf Pull Request #307 for code
pushed to Miemis production and pineapples_develop
-
reporter - changed status to closed
cf pull request #307; pull request #308 updates
- Log in to comment
For a banded report writer like Jasper, to produce a standard enrolment grid like this:
It is convenient to have the data "denormlaised so that one record of the data set corresponds to one row of the grid.
This query in commit 2acf2e1 prepares the data in that format; (see also similar denormalisation of gender in DSWarehouse)
prepares that data.
This workitem produces reusable views and stored procs so encapsulate this logic:
EnrolGrid Views
-- warehouse.EnrolGrid
-- warehouse.EnrolGridDistrict
-- warehouse.EnrolGridAuthority
-- warehouse.EnrolGridSchoolType
These 4 views denormalise warehouse.Enrol by gender and year of education. Year of education is derived from the class level. The column names are always the same, so they can be implemented as views.
GridMaker Stored Proc
To produce a grid that splits by class level in a general way - the class level names are defined in data, and may not always be in 1-1 correspondence to year of education - requires a stored proc
warehouse.GridMaker
takes a number of parameters to control the aggregation , allow filtering, and select the data item to get aggregated:@shraddha_tambe @ghachey I hope this may be useful in making reports a bit simpler and more reusable between sites?