[
https://issues.apache.org/jira/browse/SPARK-31605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17095462#comment-17095462
]
Amit Ashish edited comment on SPARK-31605 at 4/29/20, 1:42 PM:
---------------------------------------------------------------
previously closed ticket does not show the actual insert statement working.
below is the query that is not working:
insert into table test_insert partition(part_a='a', part_b) values (3, 'b');
Getting below warning:
WARN FileOperations: Ignoring invalid DP directory
hdfs://HDP3/warehouse/tablespace/external/hive/dw_analyst.db/test_insert/.hive-staging_hive_2020-04-29_13-28-46_360_4646016571504464856-1/-ext-10000/part_b=b
20/04/29 13:28:52 INFO Hive: Loaded 0 partitions
As mentioned in previous ticket , setting below does not make any difference:
set hive.exec.dynamic.partition.mode=nonstrict;
Neither setting spark.hadoop.hive.exec.dynamic.partition.mode=nonstrict as
spark config solves this .
Worst part is data does not get inserted and the return code is still 0 .
Kindly either suggest a fix for this or enable a non-zero return code to track
this in automated data pipelines .
was (Author: dreamaaj):
previously closed ticket does not show the actual insert statement working.
below is the query that is not working:
insert into table test_insert partition(part_a='a', part_b) values (3, 'b');
Getting below error:
WARN FileOperations: Ignoring invalid DP directory
hdfs://HDP3/warehouse/tablespace/external/hive/dw_analyst.db/test_insert/.hive-staging_hive_2020-04-29_13-28-46_360_4646016571504464856-1/-ext-10000/part_b=b
20/04/29 13:28:52 INFO Hive: Loaded 0 partitions
As mentioned in previous ticket , setting below does not make any difference:
set hive.exec.dynamic.partition.mode=nonstrict;
Neither setting spark.hadoop.hive.exec.dynamic.partition.mode=nonstrict as
spark config solves this .
> Unable to insert data with partial dynamic partition with Spark & Hive 3
> ------------------------------------------------------------------------
>
> Key: SPARK-31605
> URL: https://issues.apache.org/jira/browse/SPARK-31605
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.3.2
> Environment: Hortonwork HDP 3.1.0
> Spark 2.3.2
> Hive 3
> Reporter: Amit Ashish
> Priority: Major
>
> When performing inserting data with dynamic partition, the operation fails if
> all partitions are not dynamic. For example:
> The query
> {code:sql}
> insert overwrite table t1 (part_a='a', part_b) select * from t2
> {code}
> will fails with errors
> {code:xml}
> Cannot create partition spec from hdfs://xxxx/ ; missing keys [part_a]
> Ignoring invalid DP directory <path to staging directory>
> {code}
> On the other hand, if I remove the static value of part_a to make the insert
> fully dynamic, the following query will success.
> {code:sql}
> insert overwrite table t1 (part_a, part_b) select * from t2
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]