fix(uploads): set catalog on datasets created by file upload - #43301
fix(uploads): set catalog on datasets created by file upload#43301vhogberg wants to merge 2 commits into
Conversation
Code Review Agent Run #34ac8dActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #43301 +/- ##
=======================================
Coverage 66.63% 66.63%
=======================================
Files 2874 2874
Lines 163887 163887
Branches 37816 37816
=======================================
Hits 109209 109209
Misses 52535 52535
Partials 2143 2143
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review Agent Run #40a7ecActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
Fixes #43300
In UploadCommand.run() when creating the SqlaTable record, it never set catalog before:
So, set catalog=self._model.get_default_catalog() when constructing the SqlaTable, mirroring what CreateDatasetCommand already does.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — no UI changes.
TESTING INSTRUCTIONS
Automated:
test_csv_upload_dataset_catalogintests/integration_tests/databases/commands/upload_test.pyManual:
allow the
publicschema.can_uploadonDatabaseplusschema_accessonpublic, and assign it to a non-admin user.public.created from it appears in the Charts list.
ADDITIONAL INFORMATION