Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have two csv files
1. Customers activity
user_name | game_name | date | stake |
---|---|---|---|
ABC | GAME1 | 01/07/2013 | 10 |
DEF | GAME2 | 01/07/2013 | 20 |
ABC | GAME2 | 02/07/2013 | 15 |
ABC | GAME3 | 03/07/2013 | 25 |
2. Customers campaings
user_name | campaing |
---|---|
ABC | 1 |
ABC | 2 |
ABC | 3 |
DEF | 1 |
DEF | 5 |
In my application I would like to choose campaing from a list and see customers activity.
How to avoid many to many relationship in that case?
Thanks
HI,
Try this script,
Table1:
LOAD
*
FROM Customersactivity;
Table2:
LOAD
*
FROM Customerscampaings;
Table3:
LOAD
DISTINCT user_name
RESIDENT Customersactivity;
Hope this helps you.
Regards,
Jagan.
HI,
Try this script,
Table1:
LOAD
*
FROM Customersactivity;
Table2:
LOAD
*
FROM Customerscampaings;
Table3:
LOAD
DISTINCT user_name
RESIDENT Customersactivity;
Hope this helps you.
Regards,
Jagan.
It helped. Thanks. Can you please explain how it works?
HI,
Here we are arriving a new table, so that the existing tables join with this table, the new table has distinct user_name so we there is no many many relationship between the tables.
Regards,
Jagan.
Hi Jagan,
Aren't these tables associated to each other over user_name? Doesn't that still cause a many to many relation?
I tried the similar scenario on my model, it looks it didn't resolve. Am I missing sth ?
Thanks.