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
171 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, 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,810 points
1,313 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, 2019 in Big Data Hadoop by Gitika
• 37,660 points
528 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
68 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
• 10,950 points
5,897 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,950 points
890 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
37,258 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,320 points
2,201 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, 2019 in Big Data Hadoop by Gitika
• 37,660 points
420 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
• 37,660 points
72 views