Syntax to mention that the data is enclosed in double quotes in pig

0 votes
I have a text file which has header line + data lines and fields in data line are enclosed within double quotes. What syntax should I use to mention that the data is enclosed in double quotes?
Jul 10 in Big Data Hadoop by Giri
8 views

1 answer to this question.

0 votes

So, we will execute the below command,

new_A_2 = FOREACH new_A GENERATE REPLACE($0, '\\"', '') as (id: int), REPLACE($1, '\\"', '') as (name: chararray), REPLACE($2, '\\"', '') as (sal: int);

And then dump the new alias and see if the double quotes are removed or not:

dump new_A_2;
answered Jul 10 by Esha

Related Questions In Big Data Hadoop

+1 vote
1 answer

What is the process to perform an incremental data load in Sqoop?

The process to perform incremental data load ...READ MORE

answered Dec 17, 2018 in Big Data Hadoop by Frankie
• 9,810 points
248 views
0 votes
1 answer

Which data type is used to store the data in HBase table column?

Hey, Byte Array,  Put p = new Put(Bytes.toBytes("John Smith")); All ...READ MORE

answered May 28 in Big Data Hadoop by Gitika
• 19,720 points
49 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
2,047 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
196 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,477 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
764 views
0 votes
1 answer

What is the command to know the details of your data created in a table in Hive?

Hey, Yes, there is a way to check ...READ MORE

answered May 14 in Big Data Hadoop by Gitika
• 19,720 points
67 views
0 votes
1 answer

What are the relational operators available related to loading and storing in pig language?

Hey, For loading data and storing it into ...READ MORE

answered May 3 in Big Data Hadoop by Gitika
• 19,720 points
25 views