<span id="创建和使用数据看板"></span>

# Create and use data dashboards

A dashboard generates and executes SQL over selected Catalog tables and displays chart results. Sources may span catalogs and databases. Access to a dashboard does not replace permissions on its underlying tables or SQL.

<span id="创建看板并选择来源"></span>

## Create a dashboard and select its source

1. Open dashboards, create a dashboard, and give it a recognizable name.
2. In the data source selector, open the appropriate catalog and database, then select the tables to analyze.
3. For cross-database analysis, select tables in other catalogs or databases, and check the final source list.
Create a dashboard, name it, and select source tables by catalog and database. To analyze across databases, add tables from the other locations and review the complete source list before saving.

For example, combine orders from a sales database with products from another database. Check the join keys, units, and time scope first.

<span id="添加图表并检查-sql"></span>

## Add charts and check SQL

1. Add a chart and describe the question.
2. Review generated SQL, including qualified table names, joins, filters, and aggregation.
3. Preview the SQL and inspect returned columns and sample values.
4. Check chart settings and save.
5. Run the chart and compare its results with the source data.

Generating a SQL draft does not execute it. Submitting a run does not prove results are ready.

<span id="刷新与维护"></span>

## Refresh and maintain

Refresh after source data changes, then inspect each chart's loading, result, or error state. After changing sources, review dependent SQL and charts. Check inaccessible tables, changed columns, filters, and permissions before retrying.

If the first chart keeps loading, check whether it already exists before creating another. For empty charts, inspect the SQL result before changing presentation settings.

<span id="查看结果明细下探与导出"></span>

## View results, drill through, and export CSV

Each chart card supports inspecting and exporting underlying data:

- **View query result & export CSV**: Open **View query result** from a chart's actions to inspect returned rows and click **Export CSV**.
- **Detail drill-through & SQL handoff**: Click a dimension or data point to open the **Detail rows** drawer with the generated **Detail SQL**. Drill-through queries run with your current **Effective Role** permissions; click **Export current details** to download visible rows or **Open in SQL Editor** to continue exploring in [SQL Editor](sql-editor.md).

<span id="查看历史快照"></span>

## View historical snapshots

Use the **View time** control at the top of a dashboard (default: **Now**):

1. Select a preset (`1 day`, `7 days`, `15 days`, `30 days`, `3 months`, `6 months`, or `1 year`) or choose **Custom** to pick a specific timestamp.
2. If a snapshot exists at that time, charts display the historical snapshot; if the UI reports no snapshot is available, select another timestamp or switch back to **Now**.
3. **Historical snapshots do not support detail drill-through**; switch back to **Now** before drilling down.

<span id="配置数据告警与查看记录"></span>

## Configure chart alerts and view records

**Metric cards**, **Line charts**, **Bar charts**, and **Area charts** support dashboard chart alerts (other chart types show alert configuration as unsupported):

1. When adding or choosing **Edit** on a supported chart, turn on **Enable data alert**.
2. Set **Evaluation data**, **Operator**, and **Threshold**.
3. Choose **Alert level** (**Critical**, **Warning**, **Info**) and **Notification interval** (**Realtime**, **Every 15 minutes**, **Every hour**, **Every 6 hours**, or **Every 24 hours**), then save.
4. Click **Alert records** in the dashboard header to review triggered chart, condition, data point, level, status (**Alerting** / **Recovered**), and timestamp.

<span id="常见问题"></span>

## Common problems

| Symptom | How to check |
| --- | --- |
| The first chart keeps loading | Check current run state and errors, then refresh to see whether a chart already exists to avoid duplicates. |
| SQL cannot be previewed | Check qualified database/table names, selected sources, fields, and access privileges. Retain errors shown by the page. |
| Charts contain no data | Check SQL results with the same conditions first, then inspect chart columns and time filters. |
| Refresh fails | Check that sources remain available and SQL still matches current table structures. |

<span id="apisdk-和-cli"></span>

## API, SDK, and CLI

- [Manage SQL workbooks and dashboards](../../../developer/api/ai-studio/data-processing/sql-workbooks-dashboards.md): create resources, run them, and read results over HTTP.
- SDK [Manage Dashboards and Charts](../../../developer/sdk/ai-studio/数据处理/管理数据看板和图表.md): manage dashboards using Go or Python.
- CLI [SQL and Dashboards](../../../developer/cli/tasks/sql-dashboards.md#cli-data-dashboards): create dashboards, run charts, and query results.
