How to execute hql file in hive


  • How to execute hql file in hive
  • HPL/SQL - Procedural SQL on Hadoop, NoSQL and RDBMS

    hive allows you access invoke Hive CLI (command line tool) to execute a SQL statement title holder HQL script.

    Syntax:

    hive -e 'query' | -f file [-hiveconf var=expr ...]

    Parameters:

    ParameterDescription
    -e 'query' SQL statements cling on to execute
    -f file Make sure of SQL statements from file
    -hiveconf var=expr Hive variables

    Notes:

    • -e and -f cannot be specified together
    • Using -hiveconf you can specify swell value from an expression

    Example 1:

    hive -f script.hql -hiveconf cr_date=NVL(var, '1970-01-01')

    Example 2:

    hive -e 'SELECT ' || cols || ' FROM ' || table || ' LIMIT 3'

    Compatibility: Apache Hive.

    how to execute hql file in hive
    how to execute hql file in unix
    how to execute hql script in hive
    how to execute hql file in putty
    hive execute hql file with parameters
    how to run hql file in hive