RE: Converting xml to csv

2013-09-17 Thread william.dowling
need to do this. > > William F Dowling > Senior Technologist > Thomson Reuters > > > -Original Message- > From: ajay kumar [mailto:ajaysanagap...@gmail.com] > Sent: Monday, September 16, 2013 1:11 AM > To: user@pig.apache.org > Subject: Re: Converting xml

Re: Converting xml to csv

2013-09-16 Thread ajay kumar
t > Thomson Reuters > > > -Original Message- > From: ajay kumar [mailto:ajaysanagap...@gmail.com] > Sent: Monday, September 16, 2013 1:11 AM > To: user@pig.apache.org > Subject: Re: Converting xml to csv > > SORRY IF I AM WRONG.. > > WHY WE NEED TO USE REP

RE: Converting xml to csv

2013-09-16 Thread william.dowling
Senior Technologist > Thomson Reuters > > > -Original Message- > From: ajay kumar [mailto:ajaysanagap...@gmail.com] > Sent: Friday, September 13, 2013 2:21 AM > To: user@pig.apache.org > Subject: Re: Converting xml to csv > > try this ... > > register /us

Re: Converting xml to csv

2013-09-15 Thread ajay kumar
Thomson Reuters > > > -Original Message- > From: ajay kumar [mailto:ajaysanagap...@gmail.com] > Sent: Friday, September 13, 2013 2:21 AM > To: user@pig.apache.org > Subject: Re: Converting xml to csv > > try this ... > > register /usr/lib/pig/piggybank.

RE: Converting xml to csv

2013-09-13 Thread william.dowling
wline characters using B = foreach A generate REPLACE(x,'[\\n]',''); William F Dowling Senior Technologist Thomson Reuters -Original Message- From: ajay kumar [mailto:ajaysanagap...@gmail.com] Sent: Friday, September 13, 2013 2:21 AM To: user@pig.apache.org Subject: Re: C

Re: Converting xml to csv

2013-09-13 Thread ajay kumar
try this ... register /usr/lib/pig/piggybank.jar A = load '/home/sudeep/Desktop/test1' using org.apache.pig.piggybank.storage.XMLLoader('employee_id') as (x:chararray); B = foreach A generate REGEX_EXTRACT(x,'(.*)',1); On Fri, Sep 13, 2013 at 3:54 AM, jamal sasha wrote: > Hi, > I am trying to

Re: Converting xml to csv

2013-09-12 Thread jamal sasha
Hi, I am trying to parse following json 1234 emp_1...@company.com (first_name_1234,middle_initial_1234,last_name_1234) {(project_1234_1),(project_1234_2),(project_1234_3)} [programming:SQL,rdbms:Oracle] And my script is a = LOAD 'sample.xml' USING org.apache.pig.piggybank

Re: Converting xml to csv

2013-09-11 Thread ajay kumar
use org.apache.pig.piggybank.storage.XMLLoader and then extract them using regex_all On Thu, Sep 12, 2013 at 11:18 AM, jamal sasha wrote: > Umm.. yess.. but how do i generalize it.. > so what I am looking for is.. just like we have json parser in say java > If i give a valid json string.. I ca

Re: Converting xml to csv

2013-09-11 Thread jamal sasha
Umm.. yess.. but how do i generalize it.. so what I am looking for is.. just like we have json parser in say java If i give a valid json string.. I can parse it as and then i can access it as a hashmap.. But in xml loader.. i still have to specify regex rules?? Actually, is it possible to just fla

Re: Converting xml to csv

2013-09-11 Thread jamal sasha
Umm.. yess.. but how do i generalize it.. so what I am looking for is.. just like we have json parser in say java If i give a valid json string.. I can parse it as and then i can access it as a hashmap.. But in xml loader.. i still have to specify regex rules?? Actually, is it possible to just fla

Re: Converting xml to csv

2013-09-11 Thread Jagat Singh
Use piggybank xmlloader On 12/09/2013 10:14 AM, "jamal sasha" wrote: > Hi, > So I have different xml data sources...For example: > > src1.txt > > > 1 > > > 2 > > .. and so on > > > and another data > > src2.txt > > > 1 > foo > > > ... and so on > > > So basicaly different xml (valid form

Re: Converting xml to csv

2013-09-11 Thread jamal sasha
Umm.. can you elaborate? On Wed, Sep 11, 2013 at 7:38 PM, inelu nagamallikarjuna wrote: > Hai, > > Load those two files as two relations and extract or parse XML files by > using extract_regex_all and finally store them into CSV files. > > Thanks > Naga > On Sep 12, 2013 5:44 AM, "jamal sas

Re: Converting xml to csv

2013-09-11 Thread inelu nagamallikarjuna
Hai, Load those two files as two relations and extract or parse XML files by using extract_regex_all and finally store them into CSV files. Thanks Naga On Sep 12, 2013 5:44 AM, "jamal sasha" wrote: > Hi, > So I have different xml data sources...For example: > > src1.txt > > > 1 > > > 2

Converting xml to csv

2013-09-11 Thread jamal sasha
Hi, So I have different xml data sources...For example: src1.txt 1 2 .. and so on and another data src2.txt 1 foo ... and so on So basicaly different xml (valid formats) Rather than writing different pig scripts.. is there a way to write 1 script and then convert all these xml dat