Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive and HPLSQL - create table and its behaviour

Hive and HPLSQL - create table and its behaviour

New Contributor

Hi All,

I am not able to understand if there is any relation between HPLSQL and Hive.

I create simple table (very much like a oracle table) using a file x.sql. I execute the same using hplsql -f x.sql

The table is created and listed under the /user/hive/warehouse. But I am not able to use the table in the hive command line.

I feel I am clearly missing something here. I would like to understand the below

  1. How will the table created behave. My assumption is that it will behave like a normal table.
  2. Will I be able to load a csv file into that table (like the csv we load into a table that's created in hive).
  3. Where can I see the table (like desc ) if I am not able to see in hive command prompt.

I have been trying to understand it, but I am not able to crack it.

Thank you.

2 REPLIES 2

Re: Hive and HPLSQL - create table and its behaviour

@Bharath Kumar K

Please note that hplsql is procedural SQL language for Apache Hive, SparkSQL, Impala as well as any other SQL-on-Hadoop implementation, any NoSQL and any RDBMS and is not equivalent to Hive SQL / Hive Cli.

To create tables and use them, they need to created from Beeline / Hive Cli. Refer link for more details on HPLSQL.

Highlighted

Re: Hive and HPLSQL - create table and its behaviour

New Contributor

@Sindhu

We are trying to execute a query given below using HPLSQL:

CREATE TABLE1 AS SELECT * FROM TABLE2

The query gets executed properly through the HPLSQL script but the table is not getting created.Actually we are planning to execute queries with both DDL/DML queries as well as procedural language inside HIVE through HPLSQL.Is there anything wrong with this?