spark-sql-perf icon indicating copy to clipboard operation
spark-sql-perf copied to clipboard

java.lang.RuntimeException: [1.1] failure: ``with'' expected but identifier CREATE found

Open wangli86 opened this issue 8 years ago • 4 comments

hi: I am facing below issues, when I am trying to run this code. For this command tables.createExternalTables("file:///home/tpctest/", "parquet", "mydata", false) java.lang.RuntimeException: [1.1] failure: ``with'' expected but identifier CREATE found

CREATE DATABASE IF NOT EXISTS mydata ^ at scala.sys.package$.error(package.scala:27) at org.apache.spark.sql.catalyst.AbstractSparkSQLParser.parse(AbstractSparkSQLParser.scala:36) at org.apache.spark.sql.catalyst.DefaultParserDialect.parse(ParserDialect.scala:67) at org.apache.spark.sql.SQLContext$$anonfun$2.apply(SQLContext.scala:211) at org.apache.spark.sql.SQLContext$$anonfun$2.apply(SQLContext.scala:211) at org.apache.spark.sql.execution.SparkSQLParser$$anonfun$org$apache$spark$sql$execution$SparkSQLParser$$others$1.apply(SparkSQLParser.scala:114) at org.apache.spark.sql.execution.SparkSQLParser$$anonfun$org$apache$spark$sql$execution$SparkSQLParser$$others$1.apply(SparkSQLParser.scala:113) at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:136) at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:135) at scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242) at scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242) at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222) ..............

I used spark-sql-perf-0.2.4 ,scala-2.10.5 spark-1.6.1;
but this commend: tables.createTemporaryTables("file:///home/wl/tpctest/", "parquet") has no problem, can you help me resove this problem? and tpcds.createResultsTable() commend has the same with tables.createExternalTables()

wangli86 avatar Nov 25 '16 01:11 wangli86

I met the same problem

YuanGunGun avatar Mar 30 '17 12:03 YuanGunGun

having the same issue

gonzalobd avatar Jul 12 '17 12:07 gonzalobd

Any updates on this issue?

msolano00 avatar Aug 28 '17 14:08 msolano00

You need use HiveContext rather than SQLContext using-hivecontext-in-maven-project spark-submit-sql-context-create-statement-does-not-work

Mr-San avatar Apr 24 '18 18:04 Mr-San