Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-2958

Reports should use column names from metadata instead of the original sql

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.5.36
    • 2.5.35
    • daemon
    • None

    Description

      Grouper reports determine its output colum names by using the original query, parsing the substring between "select ... from", and splitting on commas. Using any sql more complex than simple column names is ugly at best (e.g. columns look like "max(end_time) as end_date" or longer), and error prone at worst, if there are commas in a formula or "from" in a subquery.

      I take it this was done with the assumption that all reports are intended to be done with custom views, rather than ad hoc sql the way that loader jobs are. This makes the creation of reports a slower process since a custom view needs to be written for every report. It also means running DDL as the database owner whenever a new report is needed.

      It may be feasible to get the column names from the query metadata once the sql is run, or at least compiled.

       

      Ref: edu.internet2.middleware.grouper.app.reports.ReportConfigType.retrieveReportDataByConfig(grouperReportConfigurationBean)

      Attachments

        Activity

          People

            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            chad.redman@at.internet2.edu Chad Redman (unc.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: