Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Load Hive table using Hiveconf Variable

avatar
Expert Contributor

Hi All,

I have something like

Myarray.sh

hive -S -hiveconf MY_VAR1 =$Var -f /home/vaibhav/Desktop/my_script.hql

Where $Var is the name of the file coming from an array from the shell script .the above line is also defined in that shell script only.

My_Script.hql

loAD DATA LOCAL INPATH '/home/vaibhav/Desktop/'${hiveconf:MY_VAR1}' ' OVERWRITE INTO TABLE xyz

When i'm trying to execute the above scenerio i'm getting error like :

FAILED: SemanticException Line 1:23 Invalid path ''/home/vaibhav/Desktop/=mydata.csv'': No files matching path file:/home /vaibhav/Desktop/=mydata.csv

1 ACCEPTED SOLUTION

avatar
Expert Contributor

This Problem has been solved.THere was an extra space between my_var1and $Var.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

This Problem has been solved.THere was an extra space between my_var1and $Var.

avatar

Glad that it got resolved.