One Star

Running a pig script from Talend

I have a pig script which is running fine and I want to run it through Talend.
The script accepts two HDFS files and do joins and produces output in aggregated form in a HDFS folder.
Code:
ORD_HEAD = LOAD 'order_header.csv' using PigStorage (',') as (orderId:int,custId:int);
ORD_DET = LOAD 'order_detail.csv' using PigStorage (',') as (orderId:int,prdId:int,sls:int);
ORD_HD_DET = JOIN ORD_HEAD BY orderId,ORD_DET BY orderId;
ORD_HD_DET_FIN = FOREACH ORD_HD_DET GENERATE custId,prdId,sls; 
GRP = GROUP ORD_HD_DET_FIN BY (custId,prdId);
RESULT = FOREACH GRP GENERATE FLATTEN($0),SUM(ORD_HD_DET_FIN.sls) as sales;
STORE RESULT INTO '/user/cloudera/ord_sls5';

Question:
Is it possible to run this as is from Talend by copying and pasting it in tPigCode?
1 REPLY
Moderator

Re: Running a pig script from Talend

Hi,
tPigcode component extends the functionalities of a Talend Job through using Pig scripts.
This component will be available in the Palette of Talend Studio on the condition that you have subscribed to one of the Talend solutions with Big Data.
Have you already checked the component reference about:TalendHelpCenter:tPigCode?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.