hadoop - How to use variables in hive load command -
i have multiple files load hive, this
t47_corporation t47_cp_deposit t47_id_deposit t47_individual ...
i try load using following command
for var in t47*; hive -e "load data local inpath ${var} overwrite table ${var}_tmp"; done
but got error
failed: parseexception line 1:23 mismatched input 't47_id_deposit' expecting stringliteral near 'inpath' in load statement
i using hive 0.13
how should finish this? thanks
i found answer, thank u inspiration
var in t47*; hive -e "load data local inpath \"${var}\" overwrite table ${var}_tmp"; done
this executed successfully
Comments
Post a Comment