Hi folks, this might be a pretty basic (read: “dum...
# gooddata-cloud
j
Hi folks, this might be a pretty basic (read: “dumb”) question, but in the data model, if I have more than 1 field that needs to be connected to a table, how do I set up the relationships? For example, I have a table called Shipment, which has Created User ID and Updated User ID. I have another table called User, which User ID (used to connect to those 2 fields in the Shipment table) and User Name (which I want to display). I’m trying to connect the User Table, but it won’t allow me to point to multiple fields. Do I have to create a SQL set for each User type and then connect those? Doesn’t seem super efficient. Any suggestions?
🫡 1
i
Hi John, I can confirm that there can be just one Primary key/Connection point. Could you share bit more details with me about your use-case, please? Does Created User ID corresponds with the User ID, where some of these IDs have also the entry under the Updated User ID?
j
hi @Ivana Gasparekova see my poor rough drawing
I think the answer to your question is yes
I’m thinking that the only way to do this is to create separate SQL sets? One for each * User ID in Shipment Table. is this correct?
@Ivana Gasparekova Any further guidance on this one?
i
Thank you for the example, appreciated. I'd suggest to have separate tables here, but please let me run some tests internally, I'll get back to you with more details shortly.
j
Sounds good. Thanks @Ivana Gasparekova. Have a wonderful weekend!
i
Hi John, Just wondering, is it possible for you to create a separate table for data related to Updated User Id? Or do you need to keep both Created User ID and Updated User ID under the same table/dataset?
j
Hi @Ivana Gasparekova - do you mean splitting Shipments Table or User Table?
i
Oh sorry, I meant the Shipments table. Would it possible to share with a me snippet of your data, please? Just couple of rows, if possible. Please feel free to use a DM for that. I just want to be sure that I understand the use-case correctly here.