You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by rs...@gmail.com, rs...@gmail.com on 2019/04/04 07:08:50 UTC

Migrating legacy filters to ad-hoc filters (Slices filter disappear after metadata DB upgrade)

Hi,

We've upgraded the Superset from 0.15 to 0.27. We use MySQL as metadata DB to store the metadata. 

Issue -:
All the filters stored in Metadata DB for slices in old version got disappear after we upgraded Superset and metadata DB from 0.15 to 0.27.

How filter model was there in Superset 0.15 -:
"flt_col_0": "",
"flt_col_1": "id",
"flt_eq_0": "",
"flt_eq_1": "1",
"flt_op_0": "in",
"flt_op_1": "in",
How filters model is there in Superset 0.27 -:
"adhoc_filters": [{"comparator": "Model TV", "expressionType": "SIMPLE", "clause": "WHERE", "fromFormData": true, "sqlExpression": null, "operator": "==", "filterOptionName": "filter_c2ih6juqp56_md3q9zf1ij", "subject": "id"}]

Expectation -:
While upgraded the Superset (0.15 to 0.27) if metadata DB is same then all the filters for slices in the new Superset(Upgraded one) should retain as they were in old Superset.

Is there a way to retain the filters for all slices/dashboards while upgrading the metadata DB ?

Thanks.
Ravi 

Re: Migrating legacy filters to ad-hoc filters (Slices filter disappear after metadata DB upgrade)

Posted by Maxime Beauchemin <ma...@gmail.com>.
While we sort out releases, I'd recommend pushing through to the latest
commit on the "release--0.31". Is it a possibility for you to do that and
report on the state of filters?

Max

On Thu, Apr 4, 2019 at 12:24 AM rskapil012@gmail.com <rs...@gmail.com>
wrote:

>
> Hi,
>
> We've upgraded the Superset from 0.15 to 0.27. We use MySQL as metadata DB
> to store the metadata.
>
> Issue -:
> All the filters stored in Metadata DB for slices in old version got
> disappear after we upgraded Superset and metadata DB from 0.15 to 0.27.
>
> How filter model was there in Superset 0.15 -:
> "flt_col_0": "",
> "flt_col_1": "id",
> "flt_eq_0": "",
> "flt_eq_1": "1",
> "flt_op_0": "in",
> "flt_op_1": "in",
> How filters model is there in Superset 0.27 -:
> "adhoc_filters": [{"comparator": "Model TV", "expressionType": "SIMPLE",
> "clause": "WHERE", "fromFormData": true, "sqlExpression": null, "operator":
> "==", "filterOptionName": "filter_c2ih6juqp56_md3q9zf1ij", "subject": "id"}]
>
> Expectation -:
> While upgraded the Superset (0.15 to 0.27) if metadata DB is same then all
> the filters for slices in the new Superset(Upgraded one) should retain as
> they were in old Superset.
>
> Is there a way to retain the filters for all slices/dashboards while
> upgrading the metadata DB ?
>
> Thanks.
> Ravi
>