Visualizing Worksheet Data

This topic describes how to visualize your SQL worksheet results using charts in Snowsight. Charts transform your query results into visualizations that communicate logical relationships and lead to more informed decision making. Charts let you quickly identify and understand patterns and outliers in data.

Snowsight supports the following types of charts:

  • Bar charts

  • Line charts

  • Scatterplots

  • Heat grids

  • Scorecards

You can also visualize your data using dashboards.

Using Charts

To get started using charts, above the results table for a query, select Charts.

The first time you access charts for a query, Snowsight automatically generates a chart for you based on your results. Each query supports one type of chart at a time.

You can change chart types at any time and exercise granular control over the data in the chart.

This section gives a brief overview of how to navigate and use charts. This section includes examples and descriptions of the following interface elements:

Interface

Description

Because of the way charts are rendered, they might not be usable by some assistive technology.

Chart

Your chart, located at the bottom of the worksheet, lets you see a visual representation of your query results. Hover over the chart to view details about each data point.

This example uses the line chart. The way the data is visualized depends on the type of chart you select.

For assistive technology, chart type is a button labeled with the currently-selected type of chart.

Chart type

Use Chart Type, located to the right of the chart, to select the type of chart for your results:

  • Line

  • Bar

  • Scatter

  • Heatgrid

  • Scorecard

For assistive technology, the data section contains buttons labeled with column names.

Data

Use the Data section, located to the right of the chart, to manage your chart columns:

  • Add or remove columns.

  • Modify how column data is represented in the chart.

For assistive technology, the column attributes are rendered as a collection of list tables and buttons.

Column attributes

When you select a column in the Data section, the column attributes appear. Use the column attributes to configure how data in that column is rendered in the chart. You can also remove the column from the chart.

For assistive technology, the appearance section contains a collection of check box and text inputs. The available inputs depend on the type of chart.

Appearance

Use the Appearance section, located to the right of the chart, to style your chart. The available settings depend on the type of chart.

The exact content of your charts depends on your results. To generate the examples in this topic, use the following query:

SELECT
  COUNT(O_ORDERDATE) as orders, O_ORDERDATE as date
FROM
  SNOWFLAKE_SAMPLE_DATA.TPCH_SF1.ORDERS
WHERE
  O_ORDERDATE = :daterange
GROUP BY
  :datebucket(O_ORDERDATE), O_ORDERDATE
ORDER BY
  O_ORDERDATE
LIMIT 10;
Copy

Charts and New Query Results

Your chart updates automatically as long as the columns used by the chart are available in the query results. If a column name changes, you must update the chart to use the new column name. Charts indicate any columns that cannot be found.

Aggregate and Bucket Data

Charts simplify grouping numbers, dates, and timestamps of more or less continuous values into various buckets. For example, suppose your query retrieves per-day data over a period of time. Without modifying your query, you can easily select a different bucket of time (e.g. weekly or monthly data) in the inspector panel to change the time dimension of the results displayed in the chart.

Charts can bucket by date, week, month, and year for date columns. For numeric columns, charts can bucket by integer values.

Charts use aggregation functions to determine a single value from multiple data points in a bucket. These functions are as follows:

  • average

  • count

  • minimum

  • maximum

  • median

  • mode

  • sum

Download Charts

Snowsight provides PNG-formatted files of charts.

To download a chart, in the upper-right corner of the chart, select Download Chart (For assistive technology, the download chart button.).