mirror of
https://github.com/apache/superset.git
synced 2026-05-13 03:45:12 +00:00
fix: set correct schema on config import (#16041)
* fix: set correct schema on config import
* Fix lint
* Fix test
* Fix tests
* Fix another test
* Fix another test
* Fix base test
* Add helper function
* Fix examples
* Fix test
* Fix test
* Fixing more tests
(cherry picked from commit 1fbce88a46)
This commit is contained in:
committed by
Elizabeth Thompson
parent
3d8ce130ba
commit
77c4f2cb11
@@ -26,6 +26,7 @@ from superset.connectors.sqla.models import SqlaTable
|
||||
from superset.models.core import Database
|
||||
from superset.models.dashboard import Dashboard
|
||||
from superset.models.slice import Slice
|
||||
from superset.utils.core import get_example_default_schema
|
||||
|
||||
|
||||
def create_table_for_dashboard(
|
||||
@@ -37,6 +38,8 @@ def create_table_for_dashboard(
|
||||
fetch_values_predicate: Optional[str] = None,
|
||||
schema: Optional[str] = None,
|
||||
) -> SqlaTable:
|
||||
schema = schema or get_example_default_schema()
|
||||
|
||||
df.to_sql(
|
||||
table_name,
|
||||
database.get_sqla_engine(),
|
||||
|
||||
Reference in New Issue
Block a user