Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone.
I'm faced with a new challenge, in which i find a lot of interest.
The fact tables share a many to many relationship so i created a link table for them which I will provide.
I would like to create a common date bridge table using the KeyDate logic, but now the tables are not joined.
How should i do this?
The script so far is:
TempMasterfactTable:
LOAD *,
floor("Date1")&'|'&floor("Date2")&'|'&floor("Date3")&'|'&floor("Date4")&'|'&floor("Date5") as KeyDate
Resident TempMasterfactTable1;
Drop Table TempMasterfactTable1;
Date_Bridge:
Load KeyDate,
date(SubField(KeyDate,'|',1)) as CanonicalDate,
'DateType1' as DateType;
Load FieldValue('KeyDate',RecNo()) as KeyDate
AutoGenerate FieldValueCount('KeyDate');
Concatenate(Date_Bridge)
Load KeyDate,
date(SubField(KeyDate,'|',2)) as CanonicalDate,
'DateType2' as DateType;
Load FieldValue('KeyDate',RecNo()) as KeyDate
AutoGenerate FieldValueCount('KeyDate');
Concatenate(Date_Bridge)
Load KeyDate,
date(SubField(KeyDate,'|',3)) as CanonicalDate,
'DateType3' as DateType;
Load FieldValue('KeyDate',RecNo()) as KeyDate
AutoGenerate FieldValueCount('KeyDate');
Concatenate(Date_Bridge)
Load KeyDate,
date(SubField(KeyDate,'|',4)) as CanonicalDate,
'DateType4' as DateType;
Load FieldValue('KeyDate',RecNo()) as KeyDate
AutoGenerate FieldValueCount('KeyDate');
Concatenate(Date_Bridge)
Load KeyDate,
date(SubField(KeyDate,'|',5)) as CanonicalDate,
'DateType5' as DateType;
Load FieldValue('KeyDate',RecNo()) as KeyDate
AutoGenerate FieldValueCount('KeyDate');
autonumber KeyDate;
Please help me on this, i am really stuck. Thank you in advance 🙂 It means a lot.
Hello 🙂
Does anyone have a hint for this case or a totally new approach?
That would help a lot. Thank you!