- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to build data modeling
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Simplest way would be to duplicate table B.
TABLE B:
LOAD
Date ,
Date as OriginalDate
.....
FROM (TABLE B SOURCE);
CONCATENATE (TABLE B)
LOAD
Date-1 as Date ,
Date as OriginalDate
FROM (TABLE B SOURCE);
What this is going to do is to associate each value of Table B to the following date and also create a "OriginalDate" field so that you can keep track of which one is the data from today, or from the previous day.
Because you have more records on table B, you can also do that in table A.
TABLE A:
LOAD
Date ,
Date as OriginalDate
.....
FROM (TABLE A SOURCE);
CONCATENATE (TABLE A)
LOAD
Date-1 as Date ,
Date as OriginalDate
FROM (TABLE A SOURCE);
But here you would have to filter by "OriginalDate" to get the day and the prior day of data from table B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi acrodrigues03,
Thanks for your suggestion, i build one mid-table, to connect the table A(Summary_1) and table B(Transaction_1) by key Daykey_1 and DAY_NUMBER1, and one Daykey_1 will mapping two DAY_NUMBER1, then my data modeling could be build successfully. Thanks one more time.