Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there,
i'm trying to get concrete values from an interval Table B to single records in Table A.
Table A has hundred thousends of records, Table B tenthousands.
Intervalmatch doesn't work here or i didn't understand that funcion. I tried an Bridgetable but there are hundred of millions record in it and the application runs out of memory.
It would be nice if anyone has an idea how i get solve this problem.
Best Regards Jens
Refer Below example; Join Result tableB to tableA
TableA:
Load * inline [
Person,Date,Order
A,2023-01-15,ABC
A,2023-02-16,DEF
A,2023-03-15,GEH
B,2023-01-15,ABC
];
TableB:
Load * inline [
Person,FromDate,ToDate,Value
A,2023-01-01,2023-01-31,1
A,2023-02-01,2023-12-31,2
B,2023-01-01,2023-12-31,1
];
Inner Join IntervalMatch (Date,Person)
Load FromDate,ToDate,Person
Resident TableB;
Left Join(TableA)
Load Person,Date,Value
Resident TableB;
Drop table TableB;
use IntervalMatch()
TableA:
Load Person,Date,Order
From XyzSource;
TableB:
Load From,To,Value
From AbcSource;
Inner Join IntervalMatch(Date,Person)
Load From,To,Person
Resident TableB;
Hi, thanks for your Reply.
If i do that so, i get a syntable.
After droping TableA there's no more longer a syntable but i lost the orderinformation and additional information from TableA. I don't need the intervals. I need single information from there in my Ordertable (TableA), because there are a lot of additional data wich i have to use in the further script.
Refer Below example; Join Result tableB to tableA
TableA:
Load * inline [
Person,Date,Order
A,2023-01-15,ABC
A,2023-02-16,DEF
A,2023-03-15,GEH
B,2023-01-15,ABC
];
TableB:
Load * inline [
Person,FromDate,ToDate,Value
A,2023-01-01,2023-01-31,1
A,2023-02-01,2023-12-31,2
B,2023-01-01,2023-12-31,1
];
Inner Join IntervalMatch (Date,Person)
Load FromDate,ToDate,Person
Resident TableB;
Left Join(TableA)
Load Person,Date,Value
Resident TableB;
Drop table TableB;