Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've been doing some experiments and tried joining two tables in Edit Script section
---------------------------------------------
table_one:
LOAD @1 as customer_id,
'496858702' as campaign
FROM
(txt, codepage is 1252, no labels, delimiter is '\t', no quotes, no eof);
table_two:
Outer join (table_one)
LOAD @1 as customer_id,
'496858802' as campaign
FROM
(txt, codepage is 1252, no labels, delimiter is '\t', no quotes, no eof);
final_table:
LOAD
customer_id,
count(campaign) as num_times
Resident table_two
group by customer_id;
drop table table_one;
---------------------------------------
but getting an error that says;
Table not found
final_table:
load
customer_id,
count(campaign) as num_times
Resident table_two
group by customer_id
-----------------------------------------------
Anyone can tell me where I'm going wrong?
Thanks
MT
final_table:
LOAD
customer_id,
count(campaign) as num_times
Resident table_two
group by customer_id;
Use Resident table_one...
you have joined table_two to table_one so table_two no more exists.
final_table:
LOAD
customer_id,
count(campaign) as num_times
Resident table_two
group by customer_id;
Use Resident table_one...
you have joined table_two to table_one so table_two no more exists.
table_two was not created, it was consumed by the join into table_one. So you should reference table_one for the results of the join.
Your join will behave like a concatenation because of the two different, hard coded, values of campaign. The count on the joined table will be the same as the counts on the original tables, one and two.
Thank you both!
MT