Member since
05-24-2016
6
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
3106 | 05-25-2016 01:45 AM |
05-25-2016
01:45 AM
I was following backdated documentation, views doesn't have partitioned on clause and hive compiler take care of partition pruning on underlying table.
... View more
05-25-2016
12:08 AM
I am trying to create partitioned view on top of a hive partitioned table, but while executing alter view to add partition info in view hive is giving unexpected error with very brief & vague error message. Below is the ddl of partitioned table (a_part) & partitioned view (a_part_view) and info of partition present in table. So when i am trying to add partition in view, it gives me below error, both properties (hive.mapred.mode & hive.exec.dynamic.partition.mode) are set to nonstrict. CREATE TABLE a_part (col1 int, col2 string, col3 date) PARTITIONED BY (dt string) STORED AS ORC;CREATE VIEW a_part_view (col1, col2, col3, dt)
PARTITIONED ON (dt)
AS SELECT col1, col2, col3, dt FROM a_part;
0: jdbc:hive2://cdhdata2:10000/default> show partitions a_part;
+--------------+--+
| partition |
+--------------+--+
| dt=20160515 |
| dt=20160516 |
| dt=20160517 |
+--------------+--+
0: jdbc:hive2://cdhdata2:10000/default> ALTER VIEW a_part_view ADD PARTITION (dt='20160515');
Error: Error while compiling statement: FAILED: SemanticException [Error 10056]: The query does not reference any valid partition. To run this query, set hive.mapred.mode=nonstrict (state=42000,code=10056) So am i missing or doing some thing wrong, It would be really helpful if somebody shed more light on this. Stack info: CDH 5.5.2, Apache hive (Hive 1.1.0-cdh5.5.2), kerberos & sentry enabled. p.s: drop partition command is working fine (although there isn't a partition to drop): 0: jdbc:hive2://cdhdata2:10000/default> ALTER VIEW a_part_view drop PARTITION (dt='20160515');
No rows affected (0.106 seconds)
... View more
Labels:
05-11-2016
10:20 AM
1 Kudo
Also can we access ORC table stored in Hive metastore in Impala.
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Impala