Skip to content

Commit 4d90676

Browse files
committed
[NEP-19106]: Adding include_filter_dataset_schemas as an optional parameter in Superset:: Dashboard::List.new()
1 parent 4c48e07 commit 4d90676

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## 0.2.4 - 2025-01-29
44
* modifies the `Superset::Dashboard::Datasets::List.new(id).schemas` to optionally include filter datasets as well.
55
* modifies the `Superset::Dashboard::Embedded::Get.new` to accept dashboard_id as named parameter
6-
* modifies the `Superset::Dashboard::List.new().retrieve_schemas` to call `Datasets::List.new(dashboard_id: id, include_filter_datasets: true).schemas` with `include_filter_datasets` to validate the filter dataset schemas during dashboard embedding.
6+
* modifies the `Superset::Dashboard::List.new()` to accept an additional named parameter `include_filter_dataset_schemas` to decide whether filter datasets needs to be included when getting the schemas of the datasets
7+
* modifies the `Superset::Dashboard::List.new().retrieve_schemas` to call `Datasets::List.new(dashboard_id: id).schemas` with an additional parameter `include_filter_datasets` to fetch the filter dataset schemas as well.
78

89

910
## 0.2.3 - 2024-11-15

lib/superset/dashboard/list.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
module Superset
66
module Dashboard
77
class List < Superset::Request
8-
attr_reader :title_contains, :title_equals, :tags_equal, :ids_not_in
8+
attr_reader :title_contains, :title_equals, :tags_equal, :ids_not_in, :include_filter_dataset_schemas
99

10-
def initialize(page_num: 0, title_contains: '', title_equals: '', tags_equal: [], ids_not_in: [])
10+
def initialize(page_num: 0, title_contains: '', title_equals: '', tags_equal: [], ids_not_in: [], include_filter_dataset_schemas: false)
1111
@title_contains = title_contains
1212
@title_equals = title_equals
1313
@tags_equal = tags_equal
1414
@ids_not_in = ids_not_in
15+
@include_filter_dataset_schemas = include_filter_dataset_schemas
1516
super(page_num: page_num)
1617
end
1718

@@ -35,7 +36,7 @@ def all
3536
end
3637

3738
def retrieve_schemas(id)
38-
{ schemas: Datasets::List.new(dashboard_id: id, include_filter_datasets: true).schemas }
39+
{ schemas: Datasets::List.new(dashboard_id: id, include_filter_datasets: include_filter_dataset_schemas).schemas }
3940
rescue StandardError => e
4041
# within Superset, a bug exists around deleting dashboards failing and the corrupting datasets configs, so handle errored datasets gracefully
4142
# ref NEP-17532

0 commit comments

Comments
 (0)