-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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 Shillelagh DB engine spec #16416
feat: add Shillelagh DB engine spec #16416
Conversation
313eb4c
to
e31b73a
Compare
Codecov Report
@@ Coverage Diff @@
## master #16416 +/- ##
=======================================
Coverage 76.51% 76.51%
=======================================
Files 1000 1001 +1
Lines 53479 53506 +27
Branches 6815 6814 -1
=======================================
+ Hits 40917 40938 +21
- Misses 12326 12330 +4
- Partials 236 238 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
b50278b
to
b8ef2b7
Compare
b8ef2b7
to
424abf2
Compare
@@ -133,7 +133,7 @@ def get_git_sha() -> str: | |||
"exasol": ["sqlalchemy-exasol>=2.1.0, <2.2"], | |||
"excel": ["xlrd>=1.2.0, <1.3"], | |||
"firebird": ["sqlalchemy-firebird>=0.7.0, <0.8"], | |||
"gsheets": ["shillelagh[gsheetsapi]>=0.7.1, <0.8"], | |||
"gsheets": ["shillelagh[gsheetsapi]>=1.0.3, <2"], |
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.
any breaking changes here?
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.
No breaking changes, just fixes and features.
@@ -133,7 +133,7 @@ def get_git_sha() -> str: | |||
"exasol": ["sqlalchemy-exasol>=2.1.0, <2.2"], | |||
"excel": ["xlrd>=1.2.0, <1.3"], | |||
"firebird": ["sqlalchemy-firebird>=0.7.0, <0.8"], | |||
"gsheets": ["shillelagh[gsheetsapi]>=0.7.1, <0.8"], | |||
"gsheets": ["shillelagh[gsheetsapi]>=1.0.3, <2"], |
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.
any breaking changes here?
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.
No breaking changes, just fixes and features.
* upstream/master: (25 commits) chore(ci): bump pylint to 2.10.2 (apache#16463) fix: prevent page crash when chart can't render (apache#16464) chore: fixed slack invite link (apache#16466) fix(native-filters): handle null values in value filter (apache#16460) feat: add function list to auto-complete to Clickhouse datasource (apache#16234) refactor(explore): improve typing for Dnd controls (apache#16362) fix(explore): update overwrite button on perm change (apache#16437) feat: Draggable and Resizable Modal (apache#16394) refactor: sql_json view endpoint (apache#16441) fix(dashboard): undo and redo buttons weird alignment (apache#16417) fix: setupPlugin in chart list page (apache#16413) fix: Disable Slack notification method if no api token (apache#16367) feat: add Shillelagh DB engine spec (apache#16416) fix: copy to Clipboard order (apache#16299) docs: make FEATURE_FLAGS.md reference a link (apache#16415) chore(viz): bump superset-ui to 0.17.87 (apache#16420) feat: add activate command (apache#16404) Revert "fix(explore): let admin overwrite slice (apache#16290)" (apache#16408) fix(explore): retain chart ownership on query context update (apache#16419) chore: Removes the TODOs and uses the default page size (apache#16422) ...
(cherry picked from commit 5e47298)
SUMMARY
Shillelagh is a library for querying APIs via SQL. It's currently used by Superset in order to connect to Google Sheets, but it offers more APIs:
Datasette
Datasette is an open-source tool for exploring and publishing data, developed by one of the creators of Django. "Datasettes" are self-hosted micro web apps that serve a few tables, with a friendly UI. For example, this list of trees in SF.
Shillelagh can query any Datasette table directly:
We can create a dataset in Superset and make a map of red maple trees in SF:
Socrata
The Socrata Open Data API is a simple API used by many governments, non-profits, and NGOs around the world, including the CDC. Shillelagh can connect directly to any Socrata dataset by using its API URL. Here's an example showing the percentage of adults partially vaccinated for COVID-19 in the US:
We can also create a dataset in Superset and make a time series:
WeatherAPI
This adapter offers access to historical weather data from WeatherAPI. It requires signing up and an API key, but there's a free account.
Here's an example chart showing the perceived temperature in Fahrenheit in Bodega Bay:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
Shillelagh supports two dialects,
shillelagh://
andshillelagh+safe://
. The former is disabled in Superset ifPREVENT_UNSAFE_DB_CONNECTIONS
is true, since it can read and write to disk. The latter allows only safe adapters to be loaded, and they have to be listed explicitly:An API key is needed for WeatherAPI:
ADDITIONAL INFORMATION