Lesson 2.4 CSV reports
These reports are easily created in the rule engine as an action and linked to a condition so they are created with the current data of the device. When a report is created it can be sent directly to your mail. They can't be edited after they are created but that is where excel reports come in. Rule engines report are easy to set up.
In this lesson, we’ll cover the following topics:
- How to create different type of CSV Reports and use Rule Engine send them to E-mail recipients.
Refer to the Report Generator User Guide for detailed specifications and configuration options for each report type.
1. CSV Export Reports (Email or Direct Download)
These reports only include the raw data in CSV format. CSV data can also be directly exported from any Device View and from Charts.
How to set it up:
Rule Engine:
- Go to the Rule Engine.
- Create a contact (email recipient) for the report.
- Create a Report action, type should be
Report, configured to output CSV only, and the JSON should specify the_idof the IoT nodes, type of measurements to include, the resolution, and the time period. You find the_idin theGeneraltab of each IoT node. - Create a Rule with a
Cronjobas the trigger (to schedule the report). - Set your Report Action as the rule's output and assign the intended recipient.
Click the>button to trigger the rule - the recipient should receive an email shortly.
Direct download:
- Devices → Select View → Select Many → Choose Devices → Action → Export to File
- Devices → Select a Device → Chart → Select measurement and time periods → Download Data
- Devices → Select Many → Choose Devices → Action → Charts → Select measurement and time periods → Download Data
This option is ideal for those who want structured data for external processing or archiving.
Also try the "Device Count" report type, which generates a report that can be used for invoicing purposes by exporting the CSV file to a compatible system.
2. Export Device List Views to CSV files
One of the easiest ways to export a view’s live data is by exporting it as CSV files. This is also the easiest way to change device names for thousands of devices. You can even update your device data this way, letting you edit devices quickly and easily - as long as you include the _id field.
For more details see Export views with CSV
3. Export Device Time Series Data to CSV files
Another easy way is to export the data in a Chart view, this can be done both from a Device Chart and the Advanced Chart that can hold multiple devices and multiple devices.
For more details see Export views with CSV