Spanish Total.js
Italiano
Documentazione Per agenti IA
Indice

Viste

Describe the data that reports can use with an SQL query and a list of fields.

.md Sito web

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

In questa pagina

A view tells Dashboard which data reports may use: an SQL query on your PostgreSQL database and one entry for each column that people can pick. You write views in the Views screen.

The Views screen with one view named Sales

Create a view

  1. Select Views in the bar on the left.
  2. Select Create. The View specification editor opens.
  3. Enter the view as JSON, then select SUBMIT.

This view reads a table of sales:

{
    "id": "sales",
    "name": "Sales",
    "sql": "SELECT region, product, amount, dtcreated FROM demo_sales",
    "fields": [
        { "column": "region", "name": "Region", "type": "string", "group": true },
        { "column": "product", "name": "Product", "type": "string", "group": true },
        { "output": "@", "column": "amount", "name": "Amount", "type": "number", "format": 2 },
        { "column": "dtcreated", "name": "Date", "type": "date", "group": true }
    ]
}

The view card appears in Views, and the view is ready to use in reports.

Edit or remove a view

Select the gear icon on the card of a view, then Edit or Remove. Removing a view also removes every report that uses it.

More about views

Views work as in OpenReports:

Fatto in Europa