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/23 16:08:44 UTC

(superset) branch fix/examples-granularity-sqla created (now 271cdd4564b)

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

eschutho pushed a change to branch fix/examples-granularity-sqla
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 271cdd4564b fix(examples): replace deprecated granularity_sqla in YAML chart configs

This branch includes the following new commits:

     new 2ebddb2e982 fix(examples): replace deprecated granularity_sqla with granularity
     new 271cdd4564b fix(examples): replace deprecated granularity_sqla in YAML chart configs

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 02/02: fix(examples): replace deprecated granularity_sqla in YAML chart configs

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 271cdd4564bf0daf206ded47ba84177533b111d1
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Sun Aug 23 16:08:09 2026 +0000

    fix(examples): replace deprecated granularity_sqla in YAML chart configs
    
    Self-review on the prior commit caught that the same slices also ship
    as YAML fixtures under examples/usa_births_names/charts and
    examples/world_health/charts, loaded unconditionally by
    load_examples_from_configs() on every `superset load_examples` run.
    Those still used the old granularity_sqla key, so the deprecation
    warning would keep firing via that path even after the .py rename.
    Mirrors the scope of the merged precedent (apache/superset#43422),
    which covered both the .py and .yaml sides of the same pattern.
---
 superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml         | 2 +-
 superset/examples/usa_births_names/charts/Boys.yaml                   | 2 +-
 superset/examples/usa_births_names/charts/Genders.yaml                | 2 +-
 superset/examples/usa_births_names/charts/Genders_by_State.yaml       | 2 +-
 superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml        | 2 +-
 superset/examples/usa_births_names/charts/Girls.yaml                  | 2 +-
 superset/examples/usa_births_names/charts/Participants.yaml           | 2 +-
 superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml         | 2 +-
 superset/examples/usa_births_names/charts/Top_10_Boy_Name_Share.yaml  | 2 +-
 superset/examples/usa_births_names/charts/Top_10_Girl_Name_Share.yaml | 2 +-
 superset/examples/usa_births_names/charts/Trends.yaml                 | 2 +-
 superset/examples/world_health/charts/Box_plot.yaml                   | 2 +-
 superset/examples/world_health/charts/Growth_Rate.yaml                | 2 +-
 superset/examples/world_health/charts/Life_Expectancy_VS_Rural.yaml   | 2 +-
 superset/examples/world_health/charts/Most_Populated_Countries.yaml   | 2 +-
 superset/examples/world_health/charts/Rural.yaml                      | 2 +-
 superset/examples/world_health/charts/Rural_Breakdown.yaml            | 2 +-
 superset/examples/world_health/charts/Treemap.yaml                    | 2 +-
 superset/examples/world_health/charts/World_s_Pop_Growth.yaml         | 2 +-
 superset/examples/world_health/charts/World_s_Population.yaml         | 2 +-
 20 files changed, 20 insertions(+), 20 deletions(-)

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..0be31804ece 100644
--- a/superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml
+++ b/superset/examples/usa_births_names/charts/Boy_Name_Cloud.yaml
@@ -28,7 +28,7 @@ params:
     subject: gender
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby: []
   limit: '100'
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Boys.yaml b/superset/examples/usa_births_names/charts/Boys.yaml
index 2ced5e43232..66ed2e07113 100644
--- a/superset/examples/usa_births_names/charts/Boys.yaml
+++ b/superset/examples/usa_births_names/charts/Boys.yaml
@@ -28,7 +28,7 @@ params:
     subject: gender
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - name
   limit: '25'
diff --git a/superset/examples/usa_births_names/charts/Genders.yaml b/superset/examples/usa_births_names/charts/Genders.yaml
index 95ebc5b6548..edea0152aac 100644
--- a/superset/examples/usa_births_names/charts/Genders.yaml
+++ b/superset/examples/usa_births_names/charts/Genders.yaml
@@ -22,7 +22,7 @@ description: null
 params:
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - gender
   limit: '25'
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..cca015b5cf7 100644
--- a/superset/examples/usa_births_names/charts/Genders_by_State.yaml
+++ b/superset/examples/usa_births_names/charts/Genders_by_State.yaml
@@ -30,7 +30,7 @@ params:
     subject: state
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - state
   limit: '25'
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..b4c33af68f3 100644
--- a/superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml
+++ b/superset/examples/usa_births_names/charts/Girl_Name_Cloud.yaml
@@ -28,7 +28,7 @@ params:
     subject: gender
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby: []
   limit: '100'
   markup_type: markdown
diff --git a/superset/examples/usa_births_names/charts/Girls.yaml b/superset/examples/usa_births_names/charts/Girls.yaml
index 6ded424ab34..6dd46b3cc4a 100644
--- a/superset/examples/usa_births_names/charts/Girls.yaml
+++ b/superset/examples/usa_births_names/charts/Girls.yaml
@@ -28,7 +28,7 @@ params:
     subject: gender
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - name
   limit: '25'
diff --git a/superset/examples/usa_births_names/charts/Participants.yaml b/superset/examples/usa_births_names/charts/Participants.yaml
index c2ec5a6f060..d179b25086c 100644
--- a/superset/examples/usa_births_names/charts/Participants.yaml
+++ b/superset/examples/usa_births_names/charts/Participants.yaml
@@ -22,7 +22,7 @@ description: null
 params:
   compare_lag: '5'
   compare_suffix: over 5Y
-  granularity_sqla: ds
+  granularity: ds
   groupby: []
   limit: '25'
   markup_type: markdown
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..882252b7f5f 100644
--- a/superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml
+++ b/superset/examples/usa_births_names/charts/Pivot_Table_v2.yaml
@@ -22,7 +22,7 @@ description: null
 params:
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby: []
   groupbyColumns:
   - state
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..1c1ccdabd8b 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
@@ -29,7 +29,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   comparison_type: values
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - name
   limit: 10
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..bd4dd78fedb 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
@@ -29,7 +29,7 @@ params:
   compare_lag: '10'
   compare_suffix: o10Y
   comparison_type: values
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - name
   limit: 10
diff --git a/superset/examples/usa_births_names/charts/Trends.yaml b/superset/examples/usa_births_names/charts/Trends.yaml
index 0d7877f216f..5a47d21c935 100644
--- a/superset/examples/usa_births_names/charts/Trends.yaml
+++ b/superset/examples/usa_births_names/charts/Trends.yaml
@@ -22,7 +22,7 @@ description: null
 params:
   compare_lag: '10'
   compare_suffix: o10Y
-  granularity_sqla: ds
+  granularity: ds
   groupby:
   - name
   limit: '25'
diff --git a/superset/examples/world_health/charts/Box_plot.yaml b/superset/examples/world_health/charts/Box_plot.yaml
index d9f542eb6e9..af9d312b912 100644
--- a/superset/examples/world_health/charts/Box_plot.yaml
+++ b/superset/examples/world_health/charts/Box_plot.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby:
   - region
   limit: '25'
diff --git a/superset/examples/world_health/charts/Growth_Rate.yaml b/superset/examples/world_health/charts/Growth_Rate.yaml
index e07f98291f8..3c4e96e7381 100644
--- a/superset/examples/world_health/charts/Growth_Rate.yaml
+++ b/superset/examples/world_health/charts/Growth_Rate.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby:
   - country_name
   limit: '25'
diff --git a/superset/examples/world_health/charts/Life_Expectancy_VS_Rural.yaml b/superset/examples/world_health/charts/Life_Expectancy_VS_Rural.yaml
index dc02ec5f986..9f3f67a1d22 100644
--- a/superset/examples/world_health/charts/Life_Expectancy_VS_Rural.yaml
+++ b/superset/examples/world_health/charts/Life_Expectancy_VS_Rural.yaml
@@ -43,7 +43,7 @@ params:
     subject: country_code
   color_scheme: supersetColors
   entity: country_name
-  granularity_sqla: year
+  granularity: year
   legendOrientation: top
   legendType: scroll
   max_bubble_size: '50'
diff --git a/superset/examples/world_health/charts/Most_Populated_Countries.yaml b/superset/examples/world_health/charts/Most_Populated_Countries.yaml
index 81c2a81ec1c..561e8cf81c9 100644
--- a/superset/examples/world_health/charts/Most_Populated_Countries.yaml
+++ b/superset/examples/world_health/charts/Most_Populated_Countries.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby:
   - country_name
   limit: '25'
diff --git a/superset/examples/world_health/charts/Rural.yaml b/superset/examples/world_health/charts/Rural.yaml
index a548be2456e..dde11656ebf 100644
--- a/superset/examples/world_health/charts/Rural.yaml
+++ b/superset/examples/world_health/charts/Rural.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby: []
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_health/charts/Rural_Breakdown.yaml b/superset/examples/world_health/charts/Rural_Breakdown.yaml
index afad630287f..d756bffc634 100644
--- a/superset/examples/world_health/charts/Rural_Breakdown.yaml
+++ b/superset/examples/world_health/charts/Rural_Breakdown.yaml
@@ -27,7 +27,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby: []
   limit: '25'
   markup_type: markdown
diff --git a/superset/examples/world_health/charts/Treemap.yaml b/superset/examples/world_health/charts/Treemap.yaml
index be14db4b8df..a4336e9c269 100644
--- a/superset/examples/world_health/charts/Treemap.yaml
+++ b/superset/examples/world_health/charts/Treemap.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby:
   - region
   - country_code
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..5bdcd382a68 100644
--- a/superset/examples/world_health/charts/World_s_Pop_Growth.yaml
+++ b/superset/examples/world_health/charts/World_s_Pop_Growth.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: o10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby:
   - region
   limit: '25'
diff --git a/superset/examples/world_health/charts/World_s_Population.yaml b/superset/examples/world_health/charts/World_s_Population.yaml
index a698253bf10..3d4b81fafcf 100644
--- a/superset/examples/world_health/charts/World_s_Population.yaml
+++ b/superset/examples/world_health/charts/World_s_Population.yaml
@@ -24,7 +24,7 @@ params:
   compare_suffix: over 10Y
   country_fieldtype: cca3
   entity: country_code
-  granularity_sqla: year
+  granularity: year
   groupby: []
   limit: '25'
   markup_type: markdown


(superset) 01/02: fix(examples): replace deprecated granularity_sqla with granularity

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2ebddb2e982a3e498a543a93fae1b3e7ce52ef4f
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Sun Aug 23 16:04:18 2026 +0000

    fix(examples): replace deprecated granularity_sqla with granularity
    
    Superset.common.query_object.DEPRECATED_FIELDS logs a warning and
    performs a runtime migration whenever granularity_sqla is present in
    form_data. The birth_names and world_bank example datasets still
    seeded slices using the old field name, triggering this warning on
    every load. get_slice_json() is a plain dict merge with no schema
    validation, so the rename is a straight drop-in with no behavior
    change once the examples are (re)loaded.
---
 superset/examples/birth_names.py | 14 +++++++-------
 superset/examples/world_bank.py  |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/superset/examples/birth_names.py b/superset/examples/birth_names.py
index 7615c02654b..10f3e122a31 100644
--- a/superset/examples/birth_names.py
+++ b/superset/examples/birth_names.py
@@ -176,7 +176,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
         "compare_lag": "10",
         "compare_suffix": "o10Y",
         "limit": "25",
-        "granularity_sqla": "ds",
+        "granularity": "ds",
         "groupby": [],
         "row_limit": current_app.config["ROW_LIMIT"],
         "time_range": "100 years ago : now",
@@ -213,7 +213,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
             params=get_slice_json(
                 defaults,
                 viz_type="big_number",
-                granularity_sqla="ds",
+                granularity="ds",
                 compare_lag="5",
                 compare_suffix="over 5Y",
                 metric=metric,
@@ -237,7 +237,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                 defaults,
                 viz_type="echarts_timeseries_line",
                 groupby=["name"],
-                granularity_sqla="ds",
+                granularity="ds",
                 rich_tooltip=True,
                 show_legend=True,
                 metrics=metrics,
@@ -420,7 +420,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                     }
                 ],
                 metrics_b=["sum__num"],
-                granularity_sqla="ds",
+                granularity="ds",
                 yAxisIndex=0,
                 yAxisIndexB=1,
             ),
@@ -474,7 +474,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                     "label": "SUM(num_california)",
                 },
                 viz_type="big_number_total",
-                granularity_sqla="ds",
+                granularity="ds",
             ),
             editors=[],
         ),
@@ -496,7 +496,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                     }
                 ],
                 viz_type="echarts_timeseries_line",
-                granularity_sqla="ds",
+                granularity="ds",
                 groupby=["name"],
                 series_limit_metric={
                     "expressionType": "SIMPLE",
@@ -542,7 +542,7 @@ def create_slices(tbl: SqlaTable) -> tuple[list[Slice], list[Slice]]:
                 defaults,
                 metric=metric,
                 viz_type="big_number_total",
-                granularity_sqla="ds",
+                granularity="ds",
                 adhoc_filters=[gen_filter("gender", "girl")],
                 subheader="total female participants",
             ),
diff --git a/superset/examples/world_bank.py b/superset/examples/world_bank.py
index 7b52226d0ec..2af38484ca8 100644
--- a/superset/examples/world_bank.py
+++ b/superset/examples/world_bank.py
@@ -154,7 +154,7 @@ def create_slices(tbl: BaseDatasource) -> list[Slice]:
         "compare_lag": "10",
         "compare_suffix": "o10Y",
         "limit": "25",
-        "granularity_sqla": "year",
+        "granularity": "year",
         "groupby": [],
         "row_limit": current_app.config["ROW_LIMIT"],
         "since": "2014-01-01",