Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Genesys Backend
Genesys Backend
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #382

Closed
Open
Opened Dec 17, 2018 by Matija Obreza@mobrezaOwner
  • Report abuse
  • New issue
Report abuse New issue

KPI group by Parameter properties

I wish to add a KPI Execution to count the "Number of accessions last updated by year" (and then by institute, by crop).

The current implementation requires me to define a Dimension that will provide the Set<Long> of the years that can then be passed to ExecutionDimension.

  1. That requires us to either maintain a NumericListDimension and add all year options manually.
  2. Generates a number of observations for years we know no updates have happened.

Idea

Allow for GROUP BY clauses in Execution definition:

  • Add group by lastModifiedDate modifier YEAR alias lastModifiedYear
    Generates: select ..., year(_base.lastModifiedDate) lastModifiedYear ... group by lastModifiedYear where ...
  • Add group by lastModifiedDate modifier MONTH alias lastModifiedMonth
    Generates: select ..., year(_base.lastModifiedDate) lastModifiedYear, month(_base.lastModifiedDate) lastModifiedMonth ... group by lastModifiedYear, lastModifiedDate where ...

The resulting Observation will therefore go from being a single row with the value (and stddev for AVERAGE) to multiple rows for existing combinations of lastModifiedYear and lastModifiedDate.

The method private Observation getSingleObservation(Query query, Object... params) {} should therefore return List<Observation> and the Observation needs to store the group-by's somewhere.

Could use the "DimensionKey"?

Assignee
Assign to
2.4
Milestone
2.4 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: genesys-pgr/genesys-server#382