feat: enable metadata sync for virtual tables (#10645)

* feat: enable metadata sync for virtual tables

* add migration and check for empty schema name

* simplify request

* truncate trailing column attributes for MySQL

* add unit test

* use db_engine_spec func to truncate collation and charset

* Remove redundant migration

* add more tests

* address review comments and apply templating to query

* add todo for refactoring

* remove schema from tests

* check column datatype
This commit is contained in:
Ville Brofeldt
2020-10-27 07:58:38 +02:00
committed by GitHub
parent 8575439f48
commit ecdff724ea
5 changed files with 139 additions and 76 deletions

View File

@@ -113,7 +113,7 @@ class TestImportExport(SupersetTestCase):
json_metadata=json.dumps(json_metadata),
)
def create_table(self, name, schema="", id=0, cols_names=[], metric_names=[]):
def create_table(self, name, schema=None, id=0, cols_names=[], metric_names=[]):
params = {"remote_id": id, "database_name": "examples"}
table = SqlaTable(
id=id, schema=schema, table_name=name, params=json.dumps(params)