Comment on page
Create Periodic Exports of your Sensor Data
The Datacake platform allows you to create periodic exports of the data from your devices. With the Reports feature you can:
- Set your own time ranges for automatic report generation (hourly, daily, weekly).
- Select one or more devices by group, day, or by name.
- Set file format.
In this section of our documentation we will show you exactly how to do this.
To create your first report, navigate to the section of the same name using the sidebar.
After clicking, the content view will switch to a list of reports. As long as you or someone else in your workspace has not yet created any reports, this list is empty and looks something like the screenshot above.
To create your first report, please click on the button "Add Report". The following modal appears:
Here you can assign a name for your reports. This will also be displayed in the table on the overview page.
As a next step, select the type of export. Currently the report engine supports the following types:
- Simple CSV - "Export multiple device data to CSV"
- Export historical readings of selected devices in your workspace as a CSV file.
- Define individual time periods for the length of the historical data.
- Export the Report as a single CSV file per device or a summarized file.
Select here a period for the recurring execution of the export.
The reports are executed on our server systems, which work with UTC and therefore it is important that you define a time zone for the report job.
For your review, here we show you the next three executions of your report.
After clicking on the "Create Report" button in the modal, your report job will be created and a detailed view will open where you can define the further settings. This looks like the following:
In the first section on the overview you will see the settings that you had already set in the modal. You can edit them here afterwards.
In the basic settings you can also specify the recipients of your reports by specifying an e-mail address.
All recipients specified here will receive a mail with a link to the download and CSV file as a direct file attachment.
If you now scroll down a little, you will see the settings and information relevant for the respective report type.
With the help of the name filter you determine the devices included in the export by specifying a text.
All devices with this text in their name will be listed. The name only has to contain this character string, regardless of its position or whether it is written in upper or lower case.
So if the devices you are going to use for export all carry "Temperature X" as their name (where X is a sequential number), then simply enter "temperature" here.
This way, all devices that have "temperature" anywhere in their name will be included in the export.
If you have assigned a tag to your devices, then the export provides a listing of these tags. Then simply select one of the tags and from now on all devices assigned to this tag will be taken into the export.
If you define more than one tag, then the devices must be assigned to both tags from now on. So it is an AND operation.
Below the filter section you can see the number of devices found by the exporter, as well as a short listing.
After you have defined the devices, you can now select the database fields whose values are to be exported.
To do this, simply select the corresponding fields via the drop-down menu.
In this drop-down menu, the fields of all devices are visible, including fields that are cross-device. You can also select fields that are not shared by every device.
The respective fields are then displayed as a list and can be removed or additional fields added at any time.
Determines the time period over which the historical data of the sensors and its fields are loaded.
Here you define the start and end range of the historical data export. Each time the report is now created, it uses the information specified here for loading the data.
It therefore makes sense that you work here only with relative time specifications, such as "24 hours ago" to "now", since an absolute date would not change with a continuous, periodic report.
If you use an absolute time in the time range specification (such as "Midnight" or even an actual date), then you must specify your time zone so that the report loads the data from the database according to the appropriate time zone.
As already mentioned, this is due to the fact that the reports are run in the background on our servers, and that they work with UTC time. So, specifying the time zone is important for absolute times. However, if you work with relative times ("24 hours ago" to "now"), then the time zone does not need to be specified.
Resolution allows you to specify quantization of the data at regular intervals or to export the raw data from the sensors.
Normally, the data export is performed as "Raw Data", i.e. the data in the export corresponds to the data as sent to Datacake by your devices. However, in an export with a larger time range, this can create very long CSV files.
The solution here is to specify a "Resolution", i.e. a quantization (or summary) of the data according to time segments.
To do this, click on the drop-down and select an appropriate time range (minutes or hours) and then specify this as a numerical value using the text field.
Let's assume that the Devices you selected send measurement data at intervals of 5 minutes. You now select a time range of one day. The result would be
24 * (60 / 5) = 288lines per export.
If you now specify a resolution of 60 minutes, the number of lines is reduced to:
24 * (60 / 60) = 24lines, since one measurement per hour.
The operation of the summary is currently:
Float / Integer: Average over given Resolution-Interval
Counter: Sum over given Resolution-Interval (Start / End) - or delta of (End - Start)
Boolean: The value that occurred most often (if 55% "True" and 45% "False" occurred within the resolution period, then the specified value is "True")
Geolocation: The value from the time center is taken. So if the resolution is set to 60 minutes, then the value is taken that lies in the time center, i.e. at +30 minutes.
We will add more options in the future.
The "Simple CSV" export allows two methods of file output:
- One file per device
- All devices combined in a single file
You can select the method by chosing one of the available option by clicking on the correspoding radio-button entry:
In the last part you can still individualize the file name and/or specify placeholders for dynamic information (such as date or device number), which are then set to the current value per export. Simply use the text box available here and individualize the file names.
The available placeholders can be found below the text box for the file name.
If you want to check the result of your report, then you don't have to wait for the execution for this, but you can start the execution manually at any time.
To do this, navigate to the overview of reports and click on the icon at the right end of the report entry in the table of the listing.
A context menu will open and here you can perform the manual execution.
In addition to the option to have the reports emailed to any recipient, you can find the past reports as a listing in the report's detail view.
To do this, open this view and scroll to the end, you will then see the following section:
Last modified 2yr ago