HQL Execute

Executes a user-defined HiveQL clause.

Information at a Glance

Category Tools
Data source type HD
Sends output to other operators Yes
Data processing tool n/a

The HQL clause executed inside this operator does not have any dependency on its preceding or succeeding operator. The connection only ensures its execution sequence within the analytic workflow. The HQL Execute code can invoke any well-formed HQL statement based on Spark SQL, including UDFs. Only queries supported by Spark SQL are supported at this time.

Input

No input is required. Alternatively, a Hive table, Load to Hive operator, or other HQL Execute operators (with Pass Output File = true) can be used as input to HQL Execute.

Configuration

Parameter Description
Notes Any notes or helpful information about this operator's parameter settings. When you enter content in the Notes field, a yellow asterisk is displayed on the operator.
Data Source Name Choose the Hive data source that this runs on.
SQL Clause Define the HQL statement to execute. Only HQL accepted by the Spark SQL implementation is accepted.

For more information, see Define SQL Statement Dialog Box.

Note: Do not change the alpine_sql_output variable while editing a clause. Doing so disrupts the operator from running.

If you compute an aggregated column (for example, SELECT COUNT(*)), you must give it an alias for the HQL Execute operator to run successfully (for example, SELECT COUNT(*) AS total_count).

Hive Result Database Name Choose the database in which to place the results, if any.
Hive Result Table Name Choose the table in which to place the results, if any.
Drop If Exists
  • If Yes (the default), drop the existing table of the same name and create a new one.
  • If No, stop the flow and alert the user that an error has occurred.
Pass Output File Pass the output file.
Results File Structure Define the structure of the results file.

Output

Visual Output
None.
Data Output
The data set from the preceding operator.