mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Fix for BigQuery connection checks and CSV uploads (#8511)
* Fix for BigQuery connection checks and CSV uploads * Don't assume encrypted_extra will be populated * Fix undefined method error * Refactor to avoid circular import strangeness
This commit is contained in:
committed by
Maxime Beauchemin
parent
3b97ae3b9d
commit
d70e0fc359
@@ -120,8 +120,12 @@ class CsvToDatabaseView(SimpleFormView):
|
||||
utils.ensure_path_exists(config["UPLOAD_FOLDER"])
|
||||
csv_file.save(path)
|
||||
table_name = form.name.data
|
||||
database = form.data.get("con")
|
||||
database.db_engine_spec.create_table_from_csv(form)
|
||||
|
||||
con = form.data.get("con")
|
||||
database = (
|
||||
db.session.query(models.Database).filter_by(id=con.data.get("id")).one()
|
||||
)
|
||||
database.db_engine_spec.create_table_from_csv(form, database)
|
||||
|
||||
table = (
|
||||
db.session.query(SqlaTable)
|
||||
|
||||
Reference in New Issue
Block a user