Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explore dashboards --data-details option #89

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Sep 20, 2023

Dear @meyerder,

related to your request at GH-70,

I have been trying to play with the jq syntax to extract the SQL statements of the data sources and not been able to do so yet. Do you have any suggestions?

this patch extends the output of grafana-wtf explore dashboards by many more details about data inquiry / queries, when adding the --data-details option. It will generate massive output, at your disposal for subsequent filtering.

When combining it with jq in this way, you can generate a flat list of all data queries used within all dashboards:

grafana-wtf explore dashboards --data-details --format=json | \
    jq -r '.[].details | values[] | .[].query // "null"'

You can install the package including this feature directly from the corresponding branch using this pip command:

pip install --upgrade 'git+https://github.com/panodata/grafana-wtf@amo/explore-dashboards-data-details'

I will be happy to hear back from you if you think this is useful in one way or another. If you think it is not enough, and would need further improvements to handle your use case, let me know.

With kind regards,
Andreas.

This extends the output by many more details about data inquiry/queries.
@amotl amotl marked this pull request as ready for review September 20, 2023 19:30
@amotl amotl mentioned this pull request Sep 20, 2023
@amotl amotl merged commit 2ce4a94 into main Sep 21, 2023
11 checks passed
@amotl amotl deleted the amo/explore-dashboards-data-details branch September 21, 2023 10:51
@amotl
Copy link
Contributor Author

amotl commented Sep 21, 2023

Now, after integrating this improvement already, you can install the development version like this:

pip install --upgrade 'git+https://github.com/panodata/grafana-wtf'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant