Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

Solved Go to solution

hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

New Contributor
@rich

hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

@Ramesh Raja

In the exam you may or may not be required to remove the header.

It is better to know how to do it and feel more comfortable.

To remove header in Hive use tblproperties:

Create table test(
name string,
email string
)
tblproperties("skip.header.line.count"="1");

//Now load the data into the table

To remove header in Pig:

A=load 'data.csv' using PigStorage(',');
B=FILTER A BY $0>1;

View solution in original post

3 REPLIES 3
Highlighted

Re: hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

@Ramesh Raja

In the exam you may or may not be required to remove the header.

It is better to know how to do it and feel more comfortable.

To remove header in Hive use tblproperties:

Create table test(
name string,
email string
)
tblproperties("skip.header.line.count"="1");

//Now load the data into the table

To remove header in Pig:

A=load 'data.csv' using PigStorage(',');
B=FILTER A BY $0>1;

View solution in original post

Highlighted

Re: hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

Expert Contributor

I did the same way, load data using PIG into a bag, and FILTER the TOP row.

Good Luck

Highlighted

Re: hi i am planning to took HDPCD certificate exam this week. on practice exam in amazon webservices flight_delays1.csv file contains data with header. In exam i need to remove header manually ??

@Ramesh Raja -

Pls consider accepting the answer if this has helped you at all.

Thank you.

Don't have an account?
Coming from Hortonworks? Activate your account here