willbarrett commented on a change in pull request #8457: [fix] Improve csv
upload functionality
URL:
https://github.com/apache/incubator-superset/pull/8457#discussion_r342324824
##########
File path: superset/views/database/views.py
##########
@@ -117,32 +117,58 @@ def form_post(self, form):
try:
utils.ensure_path_exists(config["UPLOAD_FOLDER"])
csv_file.save(path)
- table = SqlaTable(table_name=form.name.data)
- table.database = form.data.get("con")
- table.database_id = table.database.id
- table.database.db_engine_spec.create_table_from_csv(form, table)
+ table_name = form.name.data
Review comment:
This is:
1. Becoming a large try/except block
2. Becoming a large method
Can we break up this logic somehow?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]