Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Table1:
LOAD
Year&Product AS Key,
*;
LOAD * INLINE [
Year, Product, Sales
2011, A, 10
2012, B, 20
2013, C, 30
];
Table2:
LOAD
Year&Product AS Key,
*;
LOAD * INLINE [
Year, Product, Rev
2011, A, 1000
2012, B, 2000
2013, X ,3000
];
Scenario:1
Table3:
LOAD Key,
Year,
Product,
Sales
Resident Table1;
Table4:
LOAD Key,
Year,
Product,
Rev
Resident Table2;
DROP Tables Table1, Table2;
If i reload this resident load is not working. It will work when i commented one filed in either table1 or table2.
How resident load behaves here.
Scenario:2
Table3:
LOAD *,
Key
Resident Table1;
Table4:
LOAD *,
Key
Resident Table2;
DROP Tables Table1, Table2;
If i reload this error will occur like "Field names must be unique with in table".
Can you please assist me how resident load behaves here.
Regards,
Nihhal.
Hi Max,
Thanks for answer, can you see at scenario 2.
Nihhal.
Thanks Rajni.
Hi,
In scenario 2 you are doing Load *,Key Resident Table1
In this * implies all field from Table1 which are Key,Year,Product,Sales
and you also added Key field which means your query become
Load Key,Year,Product,Sales,Key Resident Table1
As you can see You are loadin same field twice therefore you are getting error which suggesting
"Field names must be unique with in table".
to avoid it you can alias one of Key field.
Hope you clear scenario2.
Regards