Hi all, my company is exploring the data filtering...
# gooddata-cn
s
Hi all, my company is exploring the data filtering feature, and I created a California workspace based on the example here: https://www.gooddata.com/developers/cloud-native/doc/cloud/manage-deployment/manage-workspaces/workspace-data-filters/ So, the filtering seems to work in some cases (see first image) But in the "analyze view" (see second image) I am able to see other states that shouldn't be in the California view. Any idea if this is a bug?
j
Hello Sheila! Thank you for reaching out. The first question I have to ask is: Have you invalidated the cache after making changes to your data? There's a uploadNotificaion API for that.
Secondly, could you please share the definition of your LDM and also the definition of the workspace data filter?
j
The physical DB model must contain a column used for filtering in all tables which must be filtered. AFAIK these are
wdf__region
and
wdf__state
in the demo model. AFAIK they are populated only into table
order_lines
, If you use attributes only from
customers
table, the filter is not applied.
You could solve it by populating these wdf columns into customers table. State and region columns are already there, so can just create new columns defaulting their values to original columns or you could create a view exposing these columns twice
Another option is to create a second workspace data filter for columnName=region/state. Why we distinguish such two use cases? Because in customers you need State and Region as real attributes while in order_lines you need them only as filters.
@Jiri Zajic I'm not changing the data, this is all just coming from the demo provided in the GoodData.CN website
@Jan Soubusta @Jiri Zajic any thoughts?
j
The demo does not contain the filter columns (
wdf__region
and
wdf__state
) in table customers, so reports utilizing only this table show all data. The question is, if it is a bug or a feature. Lack of these columns can learn users how the concept works 😉 As I mentioned, you can fix it by duplicating columns or creating views or setting a second workspace data filter on `region`/`state` columns. Would you expect that it works out-of-the-box in this demo? cc: @Miroslav Koldus