Compose a Hive Query
Use the command composer on Workbench to compose a Hive query. See Hive in Qubole for more information.
Hadoop clusters support Hive queries. See Mapping of Cluster and Command Types for more information.
Note
Run only Hive DDL commands on a Presto cluster. Running Hive DML commands on a Presto cluster is not supported.
Perform the following steps to compose a Hive query:
Navigate to Workbench and click + New Collection.
Select Hive from the command type drop-down list.
Choose the cluster on which you want to run the query. View the health metrics of a cluster before you decide to use it.
Query Statement is selected by default from the drop-down list (upper-right corner of the screen). Enter your Hive query in the text field.
or
To run a query stored, select Query Path from the drop-down list, then specify the cloud storage path that contains the Hive query file.
Add macro details (as needed).
Click Run to execute the query.
Monitor the progress of your job using the Status and Logs panes. You can toggle between the two using a switch. The Status tab also displays useful debugging information if the query does not succeed.
Note
The metastore consistency check (MSCK) result is displayed in the Logs tab when
the configuration parameter hive.qubole.write.msck.result.to.log
is enabled at the query or cluster level,
or in a Hive bootstrap. A cluster restart is required for the cluster-level setting.
You can view the results under the Results tab, and the logs under the Logs tab. For more information on how to download command results and logs, see Get Results.
See Finding Additional Hive-related Logs for more information on viewing detailed Hive logs.
View Multi-line Column Data in Query Results
Qubole supports newline (\n
) and carriage return (\r
) characters in Hive query results by escaping them in the Hive
result set and then un-escaping in the UI; this prevents any problems with the display of multi-line columns. To
enable this capability, create a ticket with Qubole Support.