Getting the query output schema in Hive

I am using Apache Hive to create and execute some queries, but I need to communicate the structure of the result set before executing the query. Queries can include joins and predictions, so it can be difficult to parse the query. The current solution we are working on involves parsing the output of the explain command, but its quite complex itself.

My question is if there is an easier way, setting some properties in the hive or some query parameters that do not fetch any data (map / prune tasks are not triggered), but creates a table that I can query with a metastor to get the diagram?

+3


source to share


1 answer


Unfortunately, there is no easier way other than using EXPLAIN or DESCRIBE commands to get the query schema and table schema.



0


source







All Articles