This is an automated email from the ASF dual-hosted git repository.
vavila pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 0d352b4e06 fix(dataset import): Support catalog field during dataset
import (#29576)
0d352b4e06 is described below
commit 0d352b4e06555f5297c6fb0640756f6cbe3c2cb2
Author: Vitor Avila <[email protected]>
AuthorDate: Fri Jul 12 17:14:47 2024 -0300
fix(dataset import): Support catalog field during dataset import (#29576)
---
superset/datasets/schemas.py | 1 +
tests/integration_tests/fixtures/importexport.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/superset/datasets/schemas.py b/superset/datasets/schemas.py
index 00599c05c8..5b899d8402 100644
--- a/superset/datasets/schemas.py
+++ b/superset/datasets/schemas.py
@@ -249,6 +249,7 @@ class ImportV1DatasetSchema(Schema):
offset = fields.Integer()
cache_timeout = fields.Integer(allow_none=True)
schema = fields.String(allow_none=True)
+ catalog = fields.String(allow_none=True)
sql = fields.String(allow_none=True)
params = fields.Dict(allow_none=True)
template_params = fields.Dict(allow_none=True)
diff --git a/tests/integration_tests/fixtures/importexport.py
b/tests/integration_tests/fixtures/importexport.py
index 5096c27233..cccf4fa770 100644
--- a/tests/integration_tests/fixtures/importexport.py
+++ b/tests/integration_tests/fixtures/importexport.py
@@ -494,6 +494,7 @@ dataset_config: dict[str, Any] = {
"offset": 66,
"cache_timeout": 55,
"schema": "",
+ "catalog": "default",
"sql": "",
"params": None,
"template_params": {},