SQL datasets and filters on dashboard (simplified ...
# gooddata-cloud
r
SQL datasets and filters on dashboard (simplified example of what I’m trying to do) In my LDM, I have imported
table1
, 3 cols
c1
,
c2
,
c3
I’ve also created a sql dataset via a regular sql on top of table1 (
ds1
) then, I made a simple table visualisation on top it
viz1
now in the dashboard dsh1, I dropped
c2
as a dashboard filter I add
viz1
to dsh1 but when applying dashboard filters,
viz1
doesn’t change (it doesn’t enforce
AND c2 = 'xxx'
for instance) how can I make sql dataset worked equally well with filters as regular tables?
1
m
Hi Romain, do I understand it correctly, that you now have in your data model: • dataset based on table1 with attributes c1, c2, c3 • another dataset ds1 - this one is SQL dataset and is based on table1? If yes, then GoodData treats these as separate independent objects and no matter how they are mapped to your data, unless they are connected/joined in the data model, the filter does not apply. Depending on what you want to achieve, if you want to have both original table1 and ds1 and be able to filter them both by c1 you can: • either make c1 (and other common attributes) a common dimension/dataset referenced from both datasets or • if there is a 1-N (or 1-1) relationship between rows in table1 and ds1 reference table1 from ds1 with a foreign key. Then filtering by anything in table1 will also filter (in the direction of the arrow) the data in ds1 (by performing an INNER JOIN) Regarding the data model in GoodData and how it affects what can be filtered by what etc, I would highly recommend this series of articles: https://university.gooddata.com/tutorials/data-modeling/logical-data-model-introduction/ if you have not read them yet. I hope this helps.
r
yes I figured that connecting the LDM to the sql DS does propagate the filters, which is what I want. Thank you!
👍 1