Hi all, Having an issue with an existing filter on...
# gooddata-platform
t
Hi all, Having an issue with an existing filter on a visualization. The filter is:
Copy code
filter_by:
    - type: date_filter
      using: business_date
I'm now getting this warning message:
Incorrect type. Expected one of Metadata / Visualisation / Table / Query / Query Filters.json-schema(2)
My colleague is using GD CLI 0.10.0 and I'm using 0.9.0. For me, I am still able to deploy to our GoodData environment using
gd deploy
but they cannot. Any help on how to fix this? I've looked for YAML documentation for how these objects are supposed to be structured but can't find any.
s
Hello yes there was breaking changes between versions so filters are now not an array but objects. So instead of this:
Copy code
filter_by:
        - type: attribute_filter
          using: attribute/campaign_name
          state:
              exclude:
                  - Social
Its necessary change it to:
Copy code
filter_by:
        attribute_filter_1:
            type: attribute_filter
            using: attribute/campaign_name
            state:
                exclude:
                    - Social
🙌 1
Where
attribute_filter_1
is local identifier that can be basically any id, but must be unique in this map. Can be references is some other places by this identifier.
m
Hi Tim, please be aware that you have posted your question to our #C01USCF4S10 channel, instead of #C04S1MSLEAW. Please make sure to post your question to the correct channel so it reaches the right people. Thanks!
t
Thanks for this! Is this updated in the documentation somewhere? Does the same change apply to dashboard objects?
s
Yes filters structure was changed everywhere to be unified 🙂