This is an automated email from the ASF dual-hosted git repository.
tai 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 11b33de61b feat(api): Added "kind" to dataset/<pk> endpoint (#20113)
11b33de61b is described below
commit 11b33de61b5b28966164daddb30f5661bd109467
Author: Reese <[email protected]>
AuthorDate: Fri Jun 10 16:03:48 2022 -0400
feat(api): Added "kind" to dataset/<pk> endpoint (#20113)
---
docs/static/resources/openapi.json | 3 +++
superset/datasets/api.py | 1 +
tests/integration_tests/datasets/api_tests.py | 1 +
3 files changed, 5 insertions(+)
diff --git a/docs/static/resources/openapi.json
b/docs/static/resources/openapi.json
index 4eb0cc7c48..330c629063 100644
--- a/docs/static/resources/openapi.json
+++ b/docs/static/resources/openapi.json
@@ -4399,6 +4399,9 @@
"nullable": true,
"type": "boolean"
},
+ "kind": {
+ "readOnly": true
+ },
"main_dttm_col": {
"maxLength": 250,
"nullable": true,
diff --git a/superset/datasets/api.py b/superset/datasets/api.py
index 17e99959e9..db61368652 100644
--- a/superset/datasets/api.py
+++ b/superset/datasets/api.py
@@ -166,6 +166,7 @@ class DatasetRestApi(BaseSupersetModelRestApi):
"datasource_type",
"url",
"extra",
+ "kind",
]
show_columns = show_select_columns + [
"columns.type_generic",
diff --git a/tests/integration_tests/datasets/api_tests.py
b/tests/integration_tests/datasets/api_tests.py
index 28bb617c17..e378811eb9 100644
--- a/tests/integration_tests/datasets/api_tests.py
+++ b/tests/integration_tests/datasets/api_tests.py
@@ -276,6 +276,7 @@ class TestDatasetApi(SupersetTestCase):
"fetch_values_predicate": None,
"filter_select_enabled": False,
"is_sqllab_view": False,
+ "kind": "physical",
"main_dttm_col": None,
"offset": 0,
"owners": [],