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, 2019 in Big Data Hadoop by Giri
1,316 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;

To know more, It's recommended to join Big Data Hadoop Course today.

answered Jul 10, 2019 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,830 points
5,454 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 29, 2019 in Big Data Hadoop by Gitika
• 65,770 points
2,274 views
0 votes
1 answer

Is data sent to some other location to be processed in pig?

With pig, we are not taking data ...READ MORE

answered Jul 10, 2019 in Big Data Hadoop by Adi
748 views
+1 vote
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
• 11,380 points
11,072 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
• 11,380 points
2,571 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
109,060 views
–1 vote
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,350 points
4,639 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 15, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,503 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, 2019 in Big Data Hadoop by Gitika
• 65,770 points
756 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP