Is this TIP old? I noticed you can do multi-key jo...
# gooddata-cloud
d
Is this TIP old? I noticed you can do multi-key joins now. Is there a reason we shouldn't? https://university.gooddata.com/tutorials/data-modeling/logical-data-model-five-pro-tips-for-data-modelling/
m
Hi Doug, when you say “multi-key” I belive you’re referring to our Composite Keys in GoodData Cloud where you can select multiple attributes from your linked dataset as a primary key. This feature was released in November 16, 2023 - So perhaps this tip is old and the article needs updating. Thanks for bringing this to our attention 🙂 https://support.gooddata.com/hc/en-us/articles/22965012479763-GoodData-Cloud-November-16-2023
d
that's exactly Right, thanks
I did try using multi-key between dimensions and facts and I'm getting this error now
Copy code
{
  "title": "Bad Request",
  "status": 400,
  "detail": "Source column should not be empty for 'attribute/z_gd_base_programs.wdf_tenant_id/db48446c940c46dd94524712f8922bc7' in dataset 'dataset/z_line_item_call_cases/db48446c940c46dd94524712f8922bc7'.",
  "traceId": "425dbcb4428299f1c52abebf48976b33"
}
can't figure it out though. I did notice that for the second primary key in the dataset for the multiple dimension tables it links to its creating duplicate keys in the table Is this feature not to be used between dimensions and facts? Or what am I don't wrong.
j
Hi Doug, can you please confirm if you followed the correct naming conventions as recommended in our docs: GoodData supports composite keys, that allow users to have foreign keys as part of a primary key (grain) of a dataset. In data sources where this cannot be determined from constraints the
grr
(grainReference) prefix is to be used, which marks the column as both part of the primary key and a foreign key.
https://www.gooddata.com/docs/cloud/model-data/prepare-your-data/#PrepareYourData-RecommendedNamingConventions
d
Is it an issue that the key that is the composite key is also the WDF filter key? We probably need to create a second one right, with the grr?
No we had not, thanks for pointing that out
Ok, we are the grr, but it is making us create duplicates. Is this OK? Is there a way around this? Is this going to create issues? We probably have 10 dimension tables that will connect with this fact table so we will have 10 different grr_tenant columns matches added. @Joseph Heun @Michael Ullock
Is this an issue?
The duplicate grr_tenant that is
j
hmmm.... This definitely should not be happening. Could you please DM me a link to the workspace so I can check out the LDM and see how everything has been configured?
Hi Doug, it looks like this got addressed here: https://gooddataconnect.slack.com/archives/C04S1MSLEAW/p1733931907168969
d
if thats the fulls story, then yes