Four Stars

tHiveRow - getting missing EOF parsing error

I am storing the below in a context context.query1
"CREATE EXTERNAL TABLE IF NOT EXISTS " + "DF." + context.tableNm + "_" + context.Version + " (" + row4.QueryRow + " ) " + "LOCATION "+ " '/data/dev/datalake/hive/warehouse'"
+ "ROW FORMAT DELIMITED"
+ "FIELDS TERMINATED BY ‘|’"
+ "LINES TERMINATED BY ‘\n’"
+ "STORED AS TEXTFILE"
and in the tHiveRow component in the Query section I input
context.query1 and running but I am getting the below Error
Error while compiling statement: FAILED: ParseException line 2:1 missing EOF at 'ROW' near "/data/dev/datalake/hive/warehouse"
: d01_f.df_preing_createhivetable_0_1.df_createHiveTable - tHiveRow_3 - Error while compiling statement: FAILED: ParseException line 2:1 missing EOF at 'ROW' near ''/datalake/ODM/d_datafabric/hive/warehouse''
how to overcome this?
2 REPLIES
Moderator

Re: tHiveRow - getting missing EOF parsing error

Hi,
"CREATE EXTERNAL TABLE IF NOT EXISTS " + "DF." + context.tableNm + "_" + context.Version + " (" + row4.QueryRow + " ) " + "LOCATION "+ " '/data/dev/datalake/hive/warehouse'"


Could you please try to use statement "CREATE EXTERNAL TABLE IF NOT EXISTS " + "DF." + context.tableNm + "_" + context.Version + "+ row4.QueryRow +" + "LOCATION "+ " '/data/dev/datalake/hive/warehouse' to see if it works?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: tHiveRow - getting missing EOF parsing error

not sure but I think it was some copy/paste issue. and PARTITION BY comes first and then LOCATION