FAILED: ParseException line x:y missing EOF at 'LOCATION' near ')' on Hive Query (Doc ID 1585329.1)

Last updated on SEPTEMBER 18, 2013

Applies to:

Big Data Appliance Integrated Software - Version 2.0.1 and later
Linux x86-64

Symptoms

Running a Hive query like the one below raises: FAILED: ParseException line <x>:<y> missing EOF at 'LOCATION' near ')'

 

hive> CREATE EXTERNAL TABLE IF NOT EXISTS doctors_ext
    > ROW FORMAT
    > SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
    > STORED AS
    > INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
    > OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
    > TBLPROPERTIES ('avro.schema.literal'='{
    > "namespace": "testing.hive.avro.serde",
    > "name": "doctors",
    > "type": "record",
    > "fields": [
    > {
    > "name":"number",
    > "type":"int",
    > "doc":"Order of playing the role"
    > },
    > {
    > "name":"first_name",
    > "type":"string",
    > "doc":"first name of actor playing role"
    > },
    > {
    > "name":"last_name",
    > "type":"string",
    > "doc":"last name of actor playing role"
    > },
    > {
    > "name":"extra_field",
    > "type":"string",
    > "doc:":"an extra field not in the original file",
    > "default":"fishfingers and custard"
    > }
    > ]
    > }')
    > LOCATION '/user/oracle/test/';
FAILED: ParseException line 35:0 missing EOF at 'LOCATION' near ')'

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms