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.
!Please check attached file.
Hi,
for Scenario1 What error you will get???
add NoConcatenate between Table1 & Table2 then try
like
Table1:
LOAD
Year&Product AS Key,
*;
LOAD * INLINE [
Year, Product, Sales
2011, A, 10
2012, B, 20
2013, C, 30
];
NoConctenate
Table2:
LOAD
Year&Product AS Key,
*;
LOAD * INLINE [
Year, Product, Rev
2011, A, 1000
2012, B, 2000
2013, X ,3000
];
Regards
You need to redefine your column names:
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 as key,
Year as year,
Product as product,
Sales as sales
Resident Table1;
Table4:
LOAD Key as key,
Rev as rev
Resident Table2;
DROP Tables Table1, Table2;
and use only Key as KEY
as You Year product will create synthetic keys which you do not want
Hi Max,
Thanks for reply, Your are not using resident load.
Please see my post briefly.
Nihhal.
Hi Robert,
Thank for reply. You are using alias names do not change anything in script.
Please take my script, paste and run application.
Then you will come to know, what will be happening.
Nihhal.
You have to use alias when using Resident
Hi Robert, is it mandatory. We can not do without alias.
Nihhal.
!Please check attached file.
In scenario 2 if you load like this
LOAD *,
Key
Resident Table1;
Key field is already loaded in table1 , so you can't add same field again with same name
that's why you facing error
Hi,
You are getting this behaviour just because of table3 output is concatenated with table1 and table2 output
therefore you have to use noconcatenate between every table.
Regards.