Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Genesys Backend Genesys Backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Genesys PGR
  • Genesys BackendGenesys Backend
  • Issues
  • #382
Closed
Open
Created Dec 17, 2018 by Matija Obreza@mobrezaOwner

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
Time tracking