Spanish Total.js
Italiano
Documentazione Per agenti IA
Indice

Report

Build tables from SQL queries, preview them, download them and publish them.

.md Sito web

Questa pagina non è ancora tradotta. Stai leggendo l’originale.

In questa pagina

A report is a table built from an SQL query on the database of the platform. You can preview it, copy it, download it and publish it as JSON.

The Reports screen with two reports in the Weather category

Create a report

  1. Open Reports and select Create.
  2. Fill in the Name.
  3. Write the SQL query in the editor. Only queries that read data are accepted.
  4. Select Preview data from SQL command to check the result.
  5. In Map fields, give the columns readable names, separated by commas: column=Label, column=Label.
  6. Set the Icon, Color, Category and Note if you like.
  7. Select SUBMIT.

The report form with an SQL query and mapped fields

  • Convert date and time to local time shows the dates in the time of the browser. Without it, dates are in UTC.
  • Publish a value to an API endpoint makes the report available as JSON. See Open data API.

A simple query to start with lists the last value of every sensor:

SELECT device, sensor, value, dtvalue FROM view_sensor ORDER BY device, sensor

Open a report

Select a report to open its data. From there you can copy the data to the clipboard or download it as CSV or XLSX.

A report with the last value of each sensor

The report menu

Select ... on a report:

The report menu

  • Preview opens the data.
  • Copy API endpoint copies the address of the published report.
  • Update changes the report, Clone creates a copy and Remove deletes it.
Fatto in Europa