简体   繁体   中英

Hive table on delta lake

I am new to spark & delta lake. I am creating hive table on top of delta table. I have necessary jars delta-core-shaded-assembly_2.11-0.1.0.jar, hive-delta_2.11-0.1.0.jar; in hive class path. Set following properties.

SET hive.input.format=io.delta.hive.HiveInputFormat;
SET hive.tez.input.format=io.delta.hive.HiveInputFormat;

But while creating table

CREATE EXTERNAL TABLE hive_table(col1 INT, col2 STRING) STORED BY 'io.delta.hive.DeltaStorageHandler' LOCATION '/path/to/my/delta/table'

Getting following exception:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.spark.network.util.JavaUtils.byteStringAs(Ljava/lang/String;Lorg/apache/spark/network/util/ByteUnit;)J

Schema of both table matches. Stack details: Spark: 2.4.4 Hive: 1.2.1

Any help is much appreciated. Thanks in advance.

Hive with delta lake only supporting with spark 3.0 and delta version 0.7.0.

<dependency>
  <groupId>io.delta</groupId>
  <artifactId>delta-core_2.12</artifactId>
  <version>0.7.0</version>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM