Searching Charts by Table Query Usage

Data Sources

For query and datasource tuning purposes you may want to find out which charts on which dashboards are sending queries to certain data source tables.

You can do that in Chartio. Using the Chartio Query Log provided in the data source screen, you can download the query log from a given time period, save it as a CSV locally on your computer or as a google sheet in your google drive if you wish, and then upload it back to chartio as a data source and build diagnostic queries on the CSV or google sheet to determine load times and data source pain points.

  1. Click Data Sources next to the search bar and choose a data source by clicking on it. Under the Query Log tab, click Download query log. This will download the query log as a CSV file that has many fields in it, including dashboard_id, slug, chart_id, duration, and query_sql.

    View Query Log by clicking on a data source

  2. Chartio supports CSV files, so just upload this CSV file back into Chartio as its own CSV data source.
  3. Create a new dashboard and add a Text Input by clicking Add Control and choosing Text Input. This will be the search box for table lookups.

    Add Text Input named TABLE

  4. Click Add Chart. This table outputs links to charts which query against the table in the TABLE Text Input that we just made.

    Add Column

  5. In the Pipeline, click “+” button to Add Transformation and choose Add Column. Title the new column something like “Chart link” or “Chart URL” to assign a new column name and keep it straight. Using a Custom formula, type this in for the formula but replace YOURORG_SLUG with the org’s Chartio link:

    “” || “Dashboard Slug” || “/chart/” || “Chart Id” || “/”
  6. Saving the table, you can now search the SQL. Note: For “like” filters, use % around the search. With small modifications, this dashboard could point out long running queries and let you investigate problematic queries.

Which charts are querying my data source table?

If you are interested in seeing which charts or data stores are querying a specific table in your data source, please email and we can provide you with the report.

Related Data Sources Help Articles

See more