Spark创建hive表报错 ROW FORMAT DELIMITED is only compatible with ‘textfile‘, not ‘orc‘

创建hive表失败:

 报错异常信息:

Operation not allowed: ROW FORMAT DELIMITED is only compatible with 'textfile', not 'orc'(line 1, pos 0) == SQL == create table src_test1111( ^^^ id string comment '序号', name string comment '姓名' )comment '测试表' row format delimited fields terminated by ''stored as orc org.apache.spark.sql.catalyst.parser.ParserUtils$.operationNotAllowed(ParserUtils.scala:39),
org.apache.spark.sql.execution.SparkSqlAstBuilder.org$apache$spark$sql$execution$SparkSqlAstBuilder$$validateRowFormatFileFormat(SparkSqlParser.scala:1256),
org.apache.spark.sql.execution.SparkSqlAstBuilder$$anonfun$visitCreateTable$1.apply(SparkSqlParser.scala:1028),
org.apache.spark.sql.execution.SparkSqlAstBuilder$$anonfun$visitCreateTable$1.apply(SparkSqlParser.scala:990),
org.apache.spark.sql.catalyst.parser.ParserUtils$.withOrigin(ParserUtils.scala:93),
org.apache.spark.sql.execution.SparkSqlAstBuilder.visitCreateTable(SparkSqlParser.scala:990)

原因应该是 spark没有提供orc的delimited操作

看这位大佬的引用,估计是新版本修复了,老版本还是不行

大佬原文及参考:

Spark 创建 hive表报错 ROW FORMAT DELIMITED is only compatible with 'textfile', not 'parquet'_jast-CSDN博客场景:在spark分析数据时,创建hive表失败。提示异常 :19/10/09 10:59:18 INFO execution.SparkSqlParser: Parsing command: CREATE EXTERNAL TABLE IF NOT EXISTSdm_xxx.user_area(biFollowersCount String,city String,creat...https://blog.csdn.net/zhangshenghang/article/details/102459033[SPARK-15279] Disallow ROW FORMAT and STORED AS (parquet | orc | avro etc.) - ASF JIRAhttps://issues.apache.org/jira/browse/SPARK-15279

猜你喜欢

转载自blog.csdn.net/m0_46282787/article/details/122963933