Hive argument using Variable Substitution (-d|--define) fails with a string argument
You'll have to escape your quotes when invoking hive, such as -d arg_partition1=\"p1\"
for this to work.
However, I don't see why you'd have to add the quotes to the replacement string in any case. Presumably you know the data types of your fields when writing the query, so if partition1
is a string then include the quotes in the query, such as WHERE partition1="${arg_partition1}";
and if it's an integer just leave them out entirely.