-
Notifications
You must be signed in to change notification settings - Fork 15.1k
fix(sqllab): save datasets with template parameters #33195
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
Conversation
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
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.
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.
I've completed my review and didn't find any issues.
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/utils/datasourceUtils.js | ✅ |
superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx | ✅ |
superset/datasets/schemas.py | ✅ |
superset-frontend/src/SqlLab/actions/sqlLab.js | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #33195 +/- ##
===========================================
+ Coverage 60.48% 83.03% +22.55%
===========================================
Files 1931 555 -1376
Lines 76236 40776 -35460
Branches 8568 0 -8568
===========================================
- Hits 46114 33860 -12254
+ Misses 28017 6916 -21101
+ Partials 2105 0 -2105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Should this be behind a checkbox in the save dataset modal/dialog? I'm thinking if users setting a |
CC @Vitor-Avila as well. I need to ramp up on my jinja intricacies! |
Hey @ethan-l-geotab, Could we make this behind a checkbox (or toggle) in the save dataset dialog? Something like "Include parameters". Not sure if there are users that do not want to persist these settings, but having it configureable would make sure we can support both flows. |
Sure! Just to double check.
My question is, if the template params includes p._filters and the checkbox is NOT checked, do we want to still save the template params? |
Hey @ethan-l-geotab, these would be my cents -- let me know if you think these don't make sense.
Let me know if you have any questions! |
Thanks for the answers, @Vitor-Avila Just a quick summary: |
that's awesome, @ethan-l-geotab! Thank you so much 🙏 Do you think it would be possible to create some tests, perhaps in |
@Vitor-Avila. I added tests in
|
@Vitor-Avila Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@Vitor-Avila Ephemeral environment spinning up at http://34.212.143.108:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
ooof forgot to enable the FF in the ephemeral -- will have to redo that |
@Vitor-Avila Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@Vitor-Avila Ephemeral environment spinning up at http://35.165.209.101:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
Couldn't make the FF work so I tested locally -- thank you so much for this feature! |
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.
LGTM!
SUMMARY
ENABLE_TEMPLATE_PROCESSING=true
Looking to solve this: #25786.
Trying to allow for datasets with stuff in the parameters to save without having a fatal error.
All it does is add the template parameters at the creation (post) of the dataset
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
TAKEN FROM THE ISSUE:
{
"my_table": "persons"
}
SELECT * FROM {{ my_table }}
Observe that you can execute the query, the context you specified in the Parameters is correctly injected because the results appear as expected.
ADDITIONAL INFORMATION