You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2026/08/24 16:12:42 UTC

(superset) 01/01: fix(examples): replace deprecated groupby field with columns in birth_names/world_bank

This is an automated email from the ASF dual-hosted git repository.

eschutho pushed a commit to branch fix/examples-groupby-deprecated-field
in repository https://gitbox.apache.org/repos/asf/superset.git

commit b6088ee86c38225c63a2a5ab850b5542afc503db
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Mon Aug 24 16:11:34 2026 +0000

    fix(examples): replace deprecated groupby field with columns in birth_names/world_bank
    
    DEPRECATED_FIELDS maps groupby -> columns (superset/common/query_object.py).
    #43422/#43432 already migrated timeseries_limit_metric and granularity_sqla
    in these same fixtures but missed the sibling groupby field, on both the
    .py slice-creation defaults and the exported .yaml chart configs.
---
 superset/examples/birth_names.py                   | 22 +++++++++++-----------
 .../usa_births_names/charts/Boy_Name_Cloud.yaml    |  2 +-
 .../examples/usa_births_names/charts/Boys.yaml     |  2 +-
 .../examples/usa_births_names/charts/Genders.yaml  |  2 +-
 .../usa_births_names/charts/Genders_by_State.yaml  |  2 +-
 .../usa_births_names/charts/Girl_Name_Cloud.yaml   |  2 +-
 .../examples/usa_births_names/charts/Girls.yaml    |  2 +-
 .../usa_births_names/charts/Participants.yaml      |  2 +-
 .../usa_births_names/charts/Pivot_Table_v2.yaml    |  2 +-
 .../charts/Top_10_Boy_Name_Share.yaml              |  2 +-
 .../charts/Top_10_Girl_Name_Share.yaml             |  2 +-
 .../examples/usa_births_names/charts/Trends.yaml   |  2 +-
 superset/examples/world_bank.py                    | 12 ++++++------
 .../examples/world_health/charts/Box_plot.yaml     |  2 +-
 .../examples/world_health/charts/Growth_Rate.yaml  |  2 +-
 .../charts/Most_Populated_Countries.yaml           |  2 +-
 superset/examples/world_health/charts/Rural.yaml   |  2 +-
 .../world_health/charts/Rural_Breakdown.yaml       |  2 +-
 superset/examples/world_health/charts/Treemap.yaml |  2 +-
 .../world_health/charts/World_s_Pop_Growth.yaml    |  2 +-
 .../world_health/charts/World_s_Population.yaml    |  2 +-
 21 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/superset/examples/birth_names.py b/superset/examples/birth_names.py
index 7615c02654b..107c0b3a956 100644
--- a/superset/examples/birth_names.py
+++ b/superset/examples/birth_names.py
@@ -177,7 +177,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
         "compare_suffix": "o10Y",
         "limit": "25",
         "granularity_sqla": "ds",
-        "groupby": [],
+        "columns": [],
         "row_limit": current_app.config["ROW_LIMIT"],
         "time_range": "100 years ago : now",
         "viz_type": "table",
@@ -225,7 +225,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             slice_name="Genders",
             viz_type="pie",
             params=get_slice_json(
-                defaults, viz_type="pie", groupby=["gender"], metric=metric
+                defaults, viz_type="pie", columns=["gender"], metric=metric
             ),
             editors=[],
         ),
@@ -236,7 +236,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             params=get_slice_json(
                 defaults,
                 viz_type="echarts_timeseries_line",
-                groupby=["name"],
+                columns=["name"],
                 granularity_sqla="ds",
                 rich_tooltip=True,
                 show_legend=True,
@@ -277,7 +277,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                         "optionName": "metric_12",
                     },
                 ],
-                groupby=["state"],
+                columns=["state"],
             ),
             editors=[],
         ),
@@ -287,7 +287,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             viz_type="table",
             params=get_slice_json(
                 defaults,
-                groupby=["name"],
+                columns=["name"],
                 adhoc_filters=[gen_filter("gender", "girl")],
                 row_limit=50,
                 series_limit_metric=metric,
@@ -318,7 +318,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             viz_type="table",
             params=get_slice_json(
                 defaults,
-                groupby=["name"],
+                columns=["name"],
                 adhoc_filters=[gen_filter("gender", "boy")],
                 row_limit=50,
                 series_limit_metric=metric,
@@ -351,7 +351,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                 defaults,
                 adhoc_filters=[gen_filter("gender", "girl")],
                 comparison_type="values",
-                groupby=["name"],
+                columns=["name"],
                 limit=10,
                 stacked_style="expand",
                 time_grain_sqla="P1D",
@@ -369,7 +369,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                 defaults,
                 adhoc_filters=[gen_filter("gender", "boy")],
                 comparison_type="values",
-                groupby=["name"],
+                columns=["name"],
                 limit=10,
                 stacked_style="expand",
                 time_grain_sqla="P1D",
@@ -441,7 +441,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             viz_type="table",
             params=get_slice_json(
                 defaults,
-                groupby=["ds"],
+                columns=["ds"],
                 time_range="1983 : 2023",
                 viz_type="table",
                 metrics=metrics,
@@ -497,7 +497,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                 ],
                 viz_type="echarts_timeseries_line",
                 granularity_sqla="ds",
-                groupby=["name"],
+                columns=["name"],
                 series_limit_metric={
                     "expressionType": "SIMPLE",
                     "column": {
@@ -520,7 +520,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             params=get_slice_json(
                 defaults,
                 metrics=metrics,
-                groupby=["name"],
+                columns=["name"],
                 row_limit=50,
                 series_limit_metric={
                     "expressionType": "SIMPLE",
diff --git a/superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml b/superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml
index cee8ecf10d2..c8171851f21 100644
--- a/superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml
+++ b/superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml
@@ -29,7 +29,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby: []
+  columns: []
   limit: '100'
   markup_type: markdown
   metric: sum__num
diff --git a/superset/examples/usa_births_names/charts/Boys.yaml b/superset/examples/usa_births_names/charts/Boys.yaml
index 2ced5e43232..17708f9d005 100644
--- a/superset/examples/usa_births_names/charts/Boys.yaml
+++ b/superset/examples/usa_births_names/charts/Boys.yaml
@@ -29,7 +29,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby:
+  columns:
   - name
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Genders.yaml b/superset/examples/usa_births_names/charts/Genders.yaml
index 95ebc5b6548..34aea510e50 100644
--- a/superset/examples/usa_births_names/charts/Genders.yaml
+++ b/superset/examples/usa_births_names/charts/Genders.yaml
@@ -23,7 +23,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby:
+  columns:
   - gender
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Genders_by_State.yaml b/superset/examples/usa_births_names/charts/Genders_by_State.yaml
index a446f002c96..fc1b24c167e 100644
--- a/superset/examples/usa_births_names/charts/Genders_by_State.yaml
+++ b/superset/examples/usa_births_names/charts/Genders_by_State.yaml
@@ -31,7 +31,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby:
+  columns:
   - state
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml b/superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml
index d286dafc01e..94d463f4e68 100644
--- a/superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml
+++ b/superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml
@@ -29,7 +29,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby: []
+  columns: []
   limit: '100'
   markup_type: markdown
   metric: sum__num
diff --git a/superset/examples/usa_births_names/charts/Girls.yaml b/superset/examples/usa_births_names/charts/Girls.yaml
index 6ded424ab34..71a98f41541 100644
--- a/superset/examples/usa_births_names/charts/Girls.yaml
+++ b/superset/examples/usa_births_names/charts/Girls.yaml
@@ -29,7 +29,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby:
+  columns:
   - name
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Participants.yaml b/superset/examples/usa_births_names/charts/Participants.yaml
index c2ec5a6f060..44b65571b06 100644
--- a/superset/examples/usa_births_names/charts/Participants.yaml
+++ b/superset/examples/usa_births_names/charts/Participants.yaml
@@ -23,7 +23,7 @@ params:
   compare_lag: '5'
   compare_suffix: over 5Y
   granularity_sqla: ds
-  groupby: []
+  columns: []
   limit: '25'
   markup_type: markdown
   metric: sum__num
diff --git a/superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml b/superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml
index 2821da9a4cc..dab3c745987 100644
--- a/superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml
+++ b/superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml
@@ -23,7 +23,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby: []
+  columns: []
   groupbyColumns:
   - state
   groupbyRows:
diff --git a/superset/examples/usa_births_names/charts/Top_10_Boy_Name_Share.yaml b/superset/examples/usa_births_names/charts/Top_10_Boy_Name_Share.yaml
index f31b95b5613..781681678a2 100644
--- a/superset/examples/usa_births_names/charts/Top_10_Boy_Name_Share.yaml
+++ b/superset/examples/usa_births_names/charts/Top_10_Boy_Name_Share.yaml
@@ -30,7 +30,7 @@ params:
   compare_suffix: o10Y
   comparison_type: values
   granularity_sqla: ds
-  groupby:
+  columns:
   - name
   limit: 10
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Top_10_Girl_Name_Share.yaml b/superset/examples/usa_births_names/charts/Top_10_Girl_Name_Share.yaml
index b9b60cc38f2..c40f03f0a00 100644
--- a/superset/examples/usa_births_names/charts/Top_10_Girl_Name_Share.yaml
+++ b/superset/examples/usa_births_names/charts/Top_10_Girl_Name_Share.yaml
@@ -30,7 +30,7 @@ params:
   compare_suffix: o10Y
   comparison_type: values
   granularity_sqla: ds
-  groupby:
+  columns:
   - name
   limit: 10
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Trends.yaml b/superset/examples/usa_births_names/charts/Trends.yaml
index 0d7877f216f..8dda7a8e3be 100644
--- a/superset/examples/usa_births_names/charts/Trends.yaml
+++ b/superset/examples/usa_births_names/charts/Trends.yaml
@@ -23,7 +23,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   granularity_sqla: ds
-  groupby:
+  columns:
   - name
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_bank.py b/superset/examples/world_bank.py
index 7b52226d0ec..dbf91cf11fb 100644
--- a/superset/examples/world_bank.py
+++ b/superset/examples/world_bank.py
@@ -155,7 +155,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
         "compare_suffix": "o10Y",
         "limit": "25",
         "granularity_sqla": "year",
-        "groupby": [],
+        "columns": [],
         "row_limit": current_app.config["ROW_LIMIT"],
         "since": "2014-01-01",
         "until": "2014-01-02",
@@ -190,7 +190,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
                 defaults,
                 viz_type="table",
                 metrics=["sum__SP_POP_TOTL"],
-                groupby=["country_name"],
+                columns=["country_name"],
             ),
         ),
         Slice(
@@ -204,7 +204,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
                 since="1960-01-01",
                 metrics=["sum__SP_POP_TOTL"],
                 num_period_compare="10",
-                groupby=["country_name"],
+                columns=["country_name"],
             ),
         ),
         Slice(
@@ -289,7 +289,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
                 since="1960-01-01",
                 until="now",
                 viz_type="echarts_area",
-                groupby=["region"],
+                columns=["region"],
                 metrics=metrics,
             ),
         ),
@@ -305,7 +305,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
                 whisker_options="Min/max (no outliers)",
                 x_ticks_layout="staggered",
                 viz_type="box_plot",
-                groupby=["region"],
+                columns=["region"],
                 metrics=metrics,
             ),
         ),
@@ -320,7 +320,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
                 until="now",
                 viz_type="treemap_v2",
                 metric="sum__SP_POP_TOTL",
-                groupby=["region", "country_code"],
+                columns=["region", "country_code"],
             ),
         ),
         Slice(
diff --git a/superset/examples/world_health/charts/Box_plot.yaml b/superset/examples/world_health/charts/Box_plot.yaml
index d9f542eb6e9..d4e95e2d055 100644
--- a/superset/examples/world_health/charts/Box_plot.yaml
+++ b/superset/examples/world_health/charts/Box_plot.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby:
+  columns:
   - region
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_health/charts/Growth_Rate.yaml b/superset/examples/world_health/charts/Growth_Rate.yaml
index e07f98291f8..818e5715ac4 100644
--- a/superset/examples/world_health/charts/Growth_Rate.yaml
+++ b/superset/examples/world_health/charts/Growth_Rate.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby:
+  columns:
   - country_name
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_health/charts/Most_Populated_Countries.yaml b/superset/examples/world_health/charts/Most_Populated_Countries.yaml
index 81c2a81ec1c..e6ee73fa361 100644
--- a/superset/examples/world_health/charts/Most_Populated_Countries.yaml
+++ b/superset/examples/world_health/charts/Most_Populated_Countries.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby:
+  columns:
   - country_name
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_health/charts/Rural.yaml b/superset/examples/world_health/charts/Rural.yaml
index a548be2456e..c0fad76d4db 100644
--- a/superset/examples/world_health/charts/Rural.yaml
+++ b/superset/examples/world_health/charts/Rural.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby: []
+  columns: []
   limit: '25'
   markup_type: markdown
   metric: sum__SP_RUR_TOTL_ZS
diff --git a/superset/examples/world_health/charts/Rural_Breakdown.yaml b/superset/examples/world_health/charts/Rural_Breakdown.yaml
index afad630287f..456b25f1402 100644
--- a/superset/examples/world_health/charts/Rural_Breakdown.yaml
+++ b/superset/examples/world_health/charts/Rural_Breakdown.yaml
@@ -28,7 +28,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby: []
+  columns: []
   limit: '25'
   markup_type: markdown
   metric: sum__SP_POP_TOTL
diff --git a/superset/examples/world_health/charts/Treemap.yaml b/superset/examples/world_health/charts/Treemap.yaml
index be14db4b8df..6268109c625 100644
--- a/superset/examples/world_health/charts/Treemap.yaml
+++ b/superset/examples/world_health/charts/Treemap.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby:
+  columns:
   - region
   - country_code
   limit: '25'
diff --git a/superset/examples/world_health/charts/World_s_Pop_Growth.yaml b/superset/examples/world_health/charts/World_s_Pop_Growth.yaml
index 30abe799d41..b646b259dc8 100644
--- a/superset/examples/world_health/charts/World_s_Pop_Growth.yaml
+++ b/superset/examples/world_health/charts/World_s_Pop_Growth.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby:
+  columns:
   - region
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_health/charts/World_s_Population.yaml b/superset/examples/world_health/charts/World_s_Population.yaml
index a698253bf10..d9c217f8d7e 100644
--- a/superset/examples/world_health/charts/World_s_Population.yaml
+++ b/superset/examples/world_health/charts/World_s_Population.yaml
@@ -25,7 +25,7 @@ params:
   country_fieldtype: cca3
   entity: country_code
   granularity_sqla: year
-  groupby: []
+  columns: []
   limit: '25'
   markup_type: markdown
   metric: sum__SP_POP_TOTL