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
feat: Add RedashDashboardExtractor for extracting dashboards from redash.io #300
feat: Add RedashDashboardExtractor for extracting dashboards from redash.io #300
Conversation
Codecov Report
@@ Coverage Diff @@
## master #300 +/- ##
==========================================
+ Coverage 73.17% 74.30% +1.13%
==========================================
Files 103 105 +2
Lines 4328 4492 +164
Branches 384 419 +35
==========================================
+ Hits 3167 3338 +171
+ Misses 1053 1049 -4
+ Partials 108 105 -3
Continue to review full report at Codecov.
|
thanks @jonhehir , I cc a few other people and will take a look next week once back from holiday. A few questions I have in mind before looking at the pr:
Also we plan to remove the py27 test and make it full py3 . Thanks a lot. |
Thanks, @feng-tao! Some brief responses are below:
The Redash API docs are incomplete. There is some basic documentation that includes the two endpoints that this relies on:
We're only relying on the public API for this extractor, nothing internal. (We do have some internal extractors for additional information like recent dashboard view count.) As for versions, that's a great question. We have tested this on Redash 8 and expect it to work for Redash 9 as well.
Yes. The type of authentication we're using here is a user-based authentication in Redash. The extractor needs to provide the API key of a user that has access to any dashboards and queries you want to index. We are not impersonating individuals other than a single API user for extraction. On a related note, we did not build support for dashboard previews because of this RBAC concern. Some users may not have full access to every dashboard that is listed, so we did not want to build a preview that would reveal an image of the dashboard to all users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @jonhehir for the info. I think it would be good to update the doc about which endpoint it relies on as well as the redash version that it tests against. But besides that, the code looks great!
Let me know if you have the chance to update the doc or we could commit the pr as it is. And we could follow up on the doc in a different pr.
also it would be super awesome if you could write an engineering blog post about the redash integration :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @jonhehir !
Summary of Changes
Gets dashboard metadata from Redash. Quoting from the README:
The included
RedashDashboardExtractor
provides support for extracting basic metadata for Redash dashboards (dashboard name, owner, URL, created/updated timestamps, and a generated description) and their associated queries (query name, URL, and raw query). It can be extended with a configurable table parser function to also support extraction ofDashboardTable
metadata.Note:
DashboardUsage
andDashboardExecution
metadata are not supported in this extractor, as these concepts are not supported by the Redash API.Tests
Added unit tests to cover the new code.
Documentation
Added a section about
RedashDashboardExtractor
toREADME.md
.CheckList
Make sure you have checked all steps below to ensure a timely review.
make test