Monday, April 11, 2016

Splitting on dot operator in Pig

For Input
101, iOS8.4

102, POS6.7

Expected Output is 
101, iOS8
102, POS6

A = LOAD '/home/hadoop/work/surjan/token/Test.txt' USING PigStorage(',') AS(id:long,a1:chararray);
B = FOREACH A GENERATE $0, FLATTEN(STRSPLIT(a1,'\\u002E')) as (a1:chararray, a1of1:chararray);

1 comment:

  1. Big data is a term that describes the large volume of data – both structured and unstructured – that inundates a business on a day-to-day basis. big data projects for students But it’s not the amount of data that’s important. Project Center in Chennai It’s what organizations do with the data that matters. Big data can be analyzed for insights that lead to better decisions and strategic business moves.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Corporate TRaining Spring Framework the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training