Configuration File

The Report Runner tool leverages a simple configuration file to instruct it on which report(s) to fetch, and where to store the downloaded CSV file(s).The following outlines the required configuration parameters. Also shown, is an example configuration file.

  • log_file: the file path to which the Report Runner tool should write its log output to. This can be useful for debugging and monitoring purposes.

  • reports: an ARRAY of report objects that the Report Runner tool should fetch and download. Each report object should contain the following parameters:

    • template_id: the unique identifier of the report template you wish to run. This can be seen in the URL when you open any report template within the Metrix Asset Management system. For example, for a report template with a URL of …/reports/template/RTO_E3MWCDP the template id will be RTO_E3MWCDP.

    • name: the name of the CSV file you wish to have the report saved as. This should be a simple string value and should NOT include any file path or extension details.

    • output_location: the file path to which the Report Runner tool should save the downloaded CSV file to. This should be a valid file path on the machine that the Report Runner tool is being executed on.

    • max_status_retries: the maximum number of times the Report Runner tool should retry checking the status of a report run before it gives up on downloading it and moves on to the next report. This can be useful for handling cases where report runs may take a long time to complete. A safe standard value for this field is, 5.

    • config: an object containing key-value pairs that represent the configuration parameters for the report you wish to run. For specific advice on what configuration parameters are required for various report templates, see the Configuration Examples section.

Example Configuration File

{
   "log_file": "C:/report-runner/logs/report-runner.log",
   "reports": [
      {
         "template_id": "RTO_E3MWCDP",
         "name": "component_information",
         "output_location": "C:/report-runner/outputs",
         "max_status_retries": 5,
         "config": {
            "selected_date": "${end-of-day}",
            "append_asset_data": false,
            "append_component_data": false,
            "fields_to_include": [ "finance_category", "gross_value", "depreciable_value" ],
            "filter": "$DEFAULT",
            "selected_report_categories": []
         }
      },
      {
         "template_id": "RTB_EFYWCDPP",
         "name": "raw_finance_data_export",
         "output_location": "C:/report-runner/outputs",
         "max_status_retries": 5,
         "config": {
            "selected_date": "${end-of-day}"
         }
      }
   ]
}

Note: in the above example, the keyword ${end-of-day} is used as a special/dynamic value for the selected_date configuration parameter. When the Report Runner tool encounters this keyword, it will automatically replace it with the current date at 11:59:59 PM. This can be useful for ensuring that your reports always run with the most up-to-date data without having to manually update the configuration file each time.