SQL and dashboards
Querying the catalog in a SQL notebook, turning a result into a chart, and pinning charts to dashboards your team can filter together.
SQL runs in SQL notebooks, on a SQL warehouse. Any result can become a chart, and any chart can be pinned to a dashboard.
Writing SQL
SQL in the main menu opens your most recent SQL notebook, or creates one called SQL Workspace the first time. You can also create a SQL notebook from the notebook list by choosing the SQL warehouse engine.
- Each cell is SQL. Run it and the result streams into a grid as it arrives, with the statement being run highlighted.
- Hover a table or column name for its details, and choose Explore ↗ to find it in the catalog tree.
- Interrupt in the toolbar cancels a running query.
- Queries run on the most recently started warehouse that is running. If none is, start one from Warehouses; the Engine button at the top of the notebook says which warehouse your queries go to.
Which tables a query sees
A SQL notebook is pinned to the catalog chosen in the top bar when you open it. A table name without a catalog prefix — analytics.orders — resolves there. Name the catalog to read another: sales_prod.analytics.orders. The toolbar's status pill shows the pinned catalog; a dashed outline means no catalog was chosen and the deployment's default is in use.
Every query runs as you. Your grants decide what you can read, and column masks and row filters apply.
Charts
Under a result, the chart button — Show or hide a chart of this result — opens a chart of it. The chart type is suggested from the result: a line for values over time, bars otherwise.
- Visualization: Bar, Line, Pie or Scatter.
- Dimension — the X axis — and Metric — the Y axis — choose which columns to plot. Update preview redraws it.
- Pin to dashboard… saves the chart to a dashboard. Give it a title and choose a dashboard, or New dashboard… to create one.
Dashboards
Dashboards lists the dashboards you have access to. Open one to see its charts as tiles.
- Rearrange tiles by dragging them. The layout is saved.
- Rename a dashboard by clicking its title.
- Cross-filter: click a bar or a slice to filter the other charts on the dashboard to it. The active filters are listed above the tiles; Clear filters removes them.
- Switch between dashboards from the list beside the title, or start a new one.
A dashboard reads through a SQL warehouse as each viewer, so two people can see different numbers on the same dashboard if their access differs. A new dashboard is empty: build a chart in a SQL notebook and pin it.