Unable to work in Pig

Hi,

When I try to execute the below statement, PIG is giving error.

grunt> students = LOAD ‘/user/prasuna7718/sample.txt’ using PigStorage(’,’) as (id:int,name:chararray,branch:chararray,year:chararray);
grunt> dump students;

Please HELP!!

2018-09-06 07:29:17,082 [main] INFO org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: UNKNOWN
2018-09-06 07:29:17,101 [main] INFO org.apache.pig.data.SchemaTupleBackend - Key [pig.schematuple] was not set… will not generate code.
2018-09-06 07:29:17,101 [main] INFO org.apache.pig.newplan.logical.optimizer.LogicalPlanOptimizer - {RULES_ENABLED=[ConstantCalculator, LoadTypeCastInserter, Pred
icatePushdownOptimizer, StreamTypeCastInserter], RULES_DISABLED=[AddForEach, ColumnMapKeyPrune, GroupByConstParallelSetter, LimitOptimizer, MergeFilter, MergeForEa
ch, PartitionFilterOptimizer, PushDownForEachFlatten, PushUpFilter, SplitFilter]}
2018-09-06 07:29:17,121 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezLauncher - Tez staging directory is /tmp/prasuna7718/staging and resource
s directory is /tmp/temp1566815454
2018-09-06 07:29:17,121 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.plan.TezCompiler - File concatenation threshold: 100 optimistic? false
2018-09-06 07:29:17,138 [main] INFO org.apache.pig.builtin.PigStorage - Using PigTextInputFormat
2018-09-06 07:29:17,139 [main] INFO org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
2018-09-06 07:29:17,139 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1
2018-09-06 07:29:17,141 [main] INFO org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 1
2018-09-06 07:29:17,149 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: joda-time-2.9.4.jar
2018-09-06 07:29:17,149 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: antlr-runtime-3.4.jar
2018-09-06 07:29:17,149 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: pig-0.16.0.2.6.5.0-292-core-h2.jar
2018-09-06 07:29:17,149 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezJobCompiler - Local resource: automaton-1.11-8.jar
2018-09-06 07:29:17,190 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - For vertex - scope-49: parallelism=1, memory=1536, java opts
=-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB
2018-09-06 07:29:17,190 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Processing aliases: students
2018-09-06 07:29:17,190 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Detailed locations: students[3,11],students[-1,-1]
2018-09-06 07:29:17,190 [main] INFO org.apache.pig.backend.hadoop.executionengine.tez.TezDagBuilder - Pig features in the vertex:
2018-09-06 07:29:17,214 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2017: Internal error creating job configuration.

Please Help here
Now, If I give the command as below

t1 = load ‘/user/prasuna7718/sample.txt’ using PigStorage(’,’) ;

It is showing the data when I give the dump t1 command

But If I load the data using a schema It is giving the below error.

2018-09-07 03:45:16,157 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2017: Internal error creating job configuration.
Details at logfile: /home/prasuna7718/pig_1536291753423.log

Hi @Prasuna_A,

I just checked your code and everything looks good.

Can you please share the screenshot?

The error is resolved now. Please Ignore