Searching Charts by Table Query Usage

Data Sources

Using Chartio, it is possible to search for what charts query certain tables.

  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.

    Create a chart in Interactive Mode

  5. In the Pipeline, click +Add Transformation and choose Add Column. Title the new column something like “Chart link.” 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.

Related Data Sources Help Articles

See more