Data Export

The RefTracker Data Export function is accessed by clicking on System in the main header bar, then selecting Utilities and then Data Export. It allows data to be selected from the RefTracker database and exported as an XML file. This is normally used to make data collected in RefTracker, available for use in other applications.

Some example Journal export definitions have been provided with your RefTracker system. The Description column provides information about the purpose of each Export. Some of the standard Exports are typical of the uses that this function can be applied to – for example the “Staff Time Journals By Date Since Last Run” example export makes the time data accumulated in RefTracker since the last time this Export was run, available as an XML file suitable for importing into a staff time billing system.

The examples provided are general purpose Exports supported by Altarama, however with a little SQL expertise, or with the help of Altarama, this data Export function can be used to create any Export that you want to create.

Applications receiving data from RefTracker will generally have specific requirements about the data they need. Your IT staff can work with the owner of the receiving application to define the exact SQL statement needed to achieve the output required for your specific receiving application, or, for a fee, Altarama can work with them to define the SQL statement.

The standard RefTracker provided data Exports cannot be amended by you, but you can copy them to use as the basis for custom Exports.

The exported data is placed in a file in your reftracker\export\'{‘export ID#’}’_'{‘export_name’}’ directory and can be downloaded from there using the System>Utilities>Administration utilities>File upload/download function. A permanent record of the exported data is saved in reftracker/data/export/archive/log_'{‘sequence ID#’}’. Files in the data/export/archive directory should not be removed as it is used to ensure that sequential runs export the correct data.

In the Export definitions tab:
Advanced View allows new Exports to be defined and existing user defined Exports to be amended (see the following section that covers the details of how to use the Advanced View function)
ID is the unique Export ID for this Export definition and is used in the name of the directory into which results of running this definition will be placed in order to ensure uniquely named directories.
Name is the name of the Export that can be run.
Description is a summary of what will be Exported and/or its purpose, as recorded by the designer of the Export.
Output File Name is the core name of the file that will be created in the reftracker\export\'{‘Export_ID#’}’_'{‘export_name’}’ directory by the Export (when the Export is run, the Export log will show the subdirectory and exact name of the file that was created by that run).
The exact file name used will be :'{‘output File Name’}’_'{‘sequence ID#’}’.xml Export. It can be downloaded using Systems>Utilities>Administration utilities>File upload/download.
Test allows the Export to be run as many times as is necessary to establish that the Export is working as desired.
Run executes that Export which creates the Exported data file and a Log file. When the Export has run, a summary of the log information displays in the Export Log tab and a View Exported Data button provides an opportunity to view the Exported Data.

Using the export definitions

You can test a data export, i.e. run it without actually creating the output file, or having the fact that it was run recorded, by clicking on the Export test button for the appropriate Export. A common reason for performing test runs is to check the likely results of a run. Importantly, because Export test does not record that the Export was run, it will not impact on results of Exports that only select records since the last time the Export was run. The results of the test will be displayed in a “Results” tab with a summary of the number of records created at the top of the screen, and under that, columns with the data exported for each record.

When you are ready to Run the data export, i.e. create the output file, click on the Run button for that Export. The file will be created and a record of its creation will be shown to you in the “Export log” tab.

In the Export log tab:
Output to shows the subdirectory and file name to which the output was written.
Records shows the number of records exported to that file.
Exported by is the name of the staff member who ran this export.
Export date is the date and time that this Export was created.
Notes is any comment that has been recorded about this Export. Notes are recorded by clicking on the Edit icon in the next column.
View Exported Data – click this to view the contents of the file that was created. It displays in the “Results” tab. Note that the data in the exported file is in XML format – the results tabs shows it to you in a column format.

Using the exported data

The file created by your Export can be found in the reftracker\export directory, in the subdirectory and with the file name shown in the Export log screen.

A copy of the Exported data has also been saved in the export/archive folder so you can remove files from this directory after you use them if desired.

The file is in XML format.

Using Advanced view

The Export definitions Advanced View provides the ability to define new Exports to suit the needs of the specific application that you want to export data to. Interfacing with another application usually requires the skills of a programmer so this page is designed to be used by a programmer with SQL skills.

To add a new Export definition, click on the “Add” icon in the top line. The screen will redisplay with open boxes into which you can enter the details of your new Export.

In the Name column, enter a unique short name for your new Export.
In the Description column, enter a description of what this Export will export. You might like to include an example use for the Export.
In the Output file name column, enter the core name that will be given to all files generated by this Export. The generated files will be placed in the reftracker/export/'{‘Export_ID#’}’_'{‘export_name’}’ directory.
In the Query column, enter the SQL that will be used to generate this Export. You can cut and paste the SQL from one of the standard queries and modify it to suit your needs, or you can write entirely new SQL.
Information about the RefTracker tables in provided at System/Data dictionary. Should you need any help with where to find the data that you need in the RefTracker database, contact your Altarama support representative.
The example Exports utilise good practice, for example, where a code table has been used to define the contents of a field, both a column containing the code, and a column containing the description of that code from the code table, have been included in the output.

When you are happy with your new Export definition, click on the green tick update icon to save your definition or the changes you have made to it.

When you are happy with your new Export definition, click on the green tick update icon to save your definition or the changes you have made to it.

To make changes to your Export definition click on the Edit icon. The system will automatically update the “Last updated by” and “Last updated on” information when you change definitions.

There is also a delete function which is instigated using the garbage bin shaped icon.