1
votes

I am trying to create a pig schema with 2B:chararray as name of one column. It is giving me an error message

2B:chararray Unexpected character ':'

If that is removed the schema is created. What is the problem here?

the schema is

load 'Batting.csv' using org.apache.pig.piggybank.storage.CSVExcelStorage(',','YES_MULTILINE','NOCHANGE','SKIP_INPUT_HEADER') as (yearID:int, sting:chararray, teamID:chararray, lgID:chararray, G:chararray, G_batting:chararray, AB:chararray, R:chararray, H:chararray, 2B:chararray);

click here for sample csv image

1
Are you sure, you have the correct number of columns in your batting.csv file? Its quite possible that there is not enough columns in your file.VK_217
yes i have it. I updated the image in the question please check itunlimitederrors

1 Answers

3
votes

It must be following the Java variable naming conventions and hence has to abide those rules.

Rules for naming java variables: All variable names must begin with a letter of the alphabet, an underscore, or ( _ ), or a dollar sign ($).