Hi,
I was wondering what would be the easiest way to validate a Hive script
with multiple query statements offline. I thought it was possible to do
that will the following Java code but it doesn't look like is possible for
all of them:

---
import org.apache.hadoop.hive.ql.parse.ParseDriver;

ParseDriver pd = new ParseDriver();
pd.parse(query);
---

With that tiny snippet, I'm able to validate some queries but fails with
other statements like:
 - ADD JAR <jar_location>;

or:
 - SET <property>=true;

I would like not to omit those and be able to parse a script with multiple
query statements.
Are there any tips you could give me to help me with this? Currently, I'm
splitting by semicolon and discarding lines with ADD and SET statements,
but there must something there I'm missing.

Thanks.

Reply via email to