Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vinayb
Contributor
Contributor

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?
Labels (2)
1 Reply
Anonymous
Not applicable

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