Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Smal example:
InputTable:
LOAD * INLINE [
MDate, Contract_ID,Attribute_Name,Attribute_Value_Text
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
InputTable2:
LOAD * INLINE [
MDate, Contract_ID,Attribute_Name2,Attribute_Value_Text2
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
ResultTable:
LOAD * Resident InputTable;
Inner Join LOAD * resident InputTable2;
InputTable:
LOAD * INLINE [
MDate, Contract_ID,Attribute_Name,Attribute_Value_Text
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
NoConcatenate
InputTable2:
LOAD * INLINE [
MDate, Contract_ID,Attribute_Name2,Attribute_Value_Text2
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
NoConcatenate
ResultTable:
LOAD * Resident InputTable;
Inner Join LOAD * resident InputTable2;
DROP Tables InputTable,InputTable2;
QV still crashes....
end with InputTable2 54 lines fetched
and crashes QV
make Right keep instead of innerjoin
ResultTable:
LOAD * Resident InputTable;
Right keep LOAD * resident InputTable2;
Still crashes....
In
InputTable:
LOAD * INLINE [
MDate, Contract_ID,Attribute_Name,Attribute_Value_Text
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
and
ResultTable:
LOAD * Resident InputTable;
the column names are equal; hence, it concatenating the tables together.
If you want help with it crashing, you're going to need to post a .qvw file.
Ok it concatenates.
So to understand better after:
ResultTable:
LOAD * Resident InputTable;
InputTable gets:
MDate, Contract_ID,Attribute_Name,Attribute_Value_Text
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
and ResultTable gets empty, right?
And what happens to these 2 tables on the inner join?
I'm working on the QVW to post here without sensitive data.
Thanks,
Miguel
Miguel Domingos wrote:
Ok it concatenates.
So to understand better after:
ResultTable:
LOAD * Resident InputTable;
InputTable gets:
MDate, Contract_ID,Attribute_Name,Attribute_Value_Text
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
and ResultTable gets empty, right?
Correct. ResultTable is never created since it just concatenates the data onto InputTable causing the number of lines to double (each line has a duplicate).
Miguel Domingos wrote:
And what happens to these 2 tables on the inner join?
My guess is the inner join is inner joining InputTable2 to itself resulting in the same data as the original.
Why using a temporary table.
Youn can load the data in 2 steps:
ResultTable:
LOAD * INLINE [
MDate, Contract_ID,Attribute_Name,Attribute_Value_Text
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
inner join LOAD * INLINE [
MDate, Contract_ID,Attribute_Name2,Attribute_Value_Text2
'2012-05-22 17:21:22.111', ball,color,red
'2012-05-22 17:21:22.111', ball,diameter,10 cm
'2012-05-22 17:21:22.111', ball,weight,100 g
'2014-05-23 17:21:22.111', box,color,black
'2014-05-23 17:21:22.111', box,height,16 cm
'2014-05-23 17:21:22.111', box,length,20 cm
'2014-05-23 17:21:22.111', box,weight,500 g
'2014-05-23 17:21:22.111', box,width,10 cm
];
the input tables are not used.
it's probably crashing because it's trying to join across many fields (ie. create a vast synthetic key). Try 'Qualify *' to investigate what is going on and see if it doesn't crash...