hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Techy Teck <>
Subject Running the HiveQL from the shell prompt.
Date Wed, 08 Aug 2012 02:46:16 GMT
This is my below HiveQL query that I am running from the shell prompt. The
only confusion that I am having with this is, If you see double quotes
before first SELECT in red color, it gets closed on the red color *#. *So
should I escape the *# *character or it will be running fine like this

hive -e *"*SELECT user_id
 SELECT user_id
,prod_and_ts.product_id AS product_id
,prod_and_ts.timestamps AS timestamps
 FROM testingtable2 LATERAL VIEW explode(purchased_item) exploded_table AS
prod_and_ts where user_id is NOT NULL
) prod_and_ts
 ) tt2 LATERAL VIEW explode(split(timestamps, *"#"*)) exploded_table2 AS
WHERE to_date(from_unixtime(cast(prod_and_ts_split AS BIGINT))) =
 GROUP BY user_id
 ORDER BY user_id
,prod_and_ts_split DESC"

View raw message