Introduction to data extracts
This article refers to Reporting Hub functionality in Elements v6.3 and later. Before this version, no data extracts had yet been migrated into the Reporting Hub.
This article continues from the following article, which introduces several broad concepts relevant to data extracts as well as other forms of reporting in Elements:
Elements data extracts are customisable templates which generate CSV files (tabular data files compatible with Excel), or less frequently, XML files (structured data that can be used for data transfer). See the 'Export formats' section below for information.
Data extracts are made accessible from within the Elements user interface. Designed and managed by nominated Reporting Hub administrators, they can be used to export tabular data for a targeted set of users of Elements.
Purpose
Data extracts are great for exporting a table of data from the Elements user interface. They excel at providing easy access to potentially large data exports for further use in reporting tools such as Excel.
Please also see:
Prerequisites
Reporting Database
All data extracts source their data from the Elements Reporting Database. This database must be installed in order for all data extracts to function correctly. For clients hosting their own instances of Elements, please see the following support articles on how to install the Reporting Database:
Installation of this database is handled by Symplectic for hosted instances of Elements.
Targets of data extracts
Data extracts can be configured to report on specific types of Elements data. Currently, the Reporting Hub supports the following types of target for data extracts. You will be asked to choose between them when registering a new custom data extract.
No target
A report with no target, when run, does not ask the user running it to choose any particular data on which to run the report. Reports without targets are therefore best suited to return data not specific to any particular group or user.
Group reports
A group report, when run, asks the user running it to choose a group in Elements on which to run the report. Only those groups for which the report is configured to run, and on which the viewing user has suitable data usage permissions, are offered.
User reports
A user report, when run, asks the user running it to choose a user in Elements on which to run the report. Only those users in groups for which the report is configured to run, and on which the viewing user has suitable data usage permissions, are offered. If the user has not been granted any specific roles, they will only be able to run the report against themselves.
Groups and users reports
A groups and users report, when run, asks the user running it to choose one or more groups and/or one or more users on which to run the report. Only those groups for which the report is configured to run, and on which the viewing user has suitable data usage permissions, are offered. Only those users in groups which the report is configured to run, and on which the viewing user has suitable data usage permissions, are offered.
Please see the Report Viewing and Running Permissions section of the following article for more information:
Custom data extracts
Behind the scenes, an Elements data extract is just an SQL script that executes against the Reporting Database when the report is run.
The custom SQL script can be authored externally in your favourite SQL editor, then pasted into the report registration in Elements as the definition of a data extract report. If the report is configured with parameters, these can be used directly in the script as SQL parameters.
Export formats
While SQL scripts will usually return tabular data for export from Elements in CSV format, it is possible to write SQL that returns data in XML format. When you add your SQL file on the ‘Create a new report’ page, the system will automatically detect whether or not the code is intended to return tabular data in CSV format, or structured data in XML format. If the automatic detection is incorrect, it is possible to manually override this. In this case the system will indicate that the ‘Export format does not match the one detected based on report definition file’
