Using Chartio, it is possible to search for what charts query certain tables.
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.
- Chartio supports CSV files, so just upload this CSV file back into Chartio as its own CSV data source.
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.
Click Add Chart. This table outputs links to charts which query against the table in the TABLE Text Input that we just made.
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:
“https://chartio.com/YOURORG_SLUG/” “Dashboard Slug” “/chart/” “Chart Id” “/”
- 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.