我寫信是為了詢問以下錯誤:
om.databricks.backend.common.rpc.DatabricksExceptions SQLExecutionException美元:org.apache.spark.sql。為拚花AnalysisException:無法推斷出模式。它必須手動指定。
在org.apache.spark.sql.execution.datasources.DataSource。美元anonfun getOrInferFileFormatSchema 13美元(DataSource.scala: 234)
scala.Option.getOrElse (Option.scala: 189)
org.apache.spark.sql.execution.datasources.DataSource.getOrInferFileFormatSchema (DataSource.scala: 234)
org.apache.spark.sql.execution.datasources.DataSource.resolveRelation (DataSource.scala: 468)
org.apache.spark.sql.execution.command.CreateDataSourceTableCommand.run (createDataSourceTables.scala: 89)
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult lzycompute美元(commands.scala: 75)
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult (commands.scala: 73)
org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect (commands.scala: 84)
在org.apache.spark.sql.Dataset。anonfun logicalPlan美元1美元(Dataset.scala: 235)
在org.apache.spark.sql.Dataset。anonfun withAction美元1美元(Dataset.scala: 3825)
在org.apache.spark.sql.execution.SQLExecution。美元anonfun withCustomExecutionEnv 5美元(SQLExecution.scala: 130)
org.apache.spark.sql.execution.SQLExecution .withSQLConfPropagated美元(SQLExecution.scala: 273)
在org.apache.spark.sql.execution.SQLExecution。美元anonfun withCustomExecutionEnv 1美元(SQLExecution.scala: 104)
org.apache.spark.sql.SparkSession.withActive (SparkSession.scala: 854)
org.apache.spark.sql.execution.SQLExecution .withCustomExecutionEnv美元(SQLExecution.scala: 77)
org.apache.spark.sql.execution.SQLExecution .withNewExecutionId美元(SQLExecution.scala: 223)
org.apache.spark.sql.Dataset.withAction (Dataset.scala: 3823)
在org.apache.spark.sql.Dataset。< init > (Dataset.scala: 235)
在org.apache.spark.sql.Dataset。美元anonfun ofRows 2美元(Dataset.scala: 104)
org.apache.spark.sql.SparkSession.withActive (SparkSession.scala: 854)
從下麵的代碼生成(直接從磚學院SQL複製培訓):
刪除表如果存在dc_data_raw;
創建表dc_data_raw
使用拚花
選項(
路徑“/ FileStore /表/ data_centers_q2_q3.snappy.parquet”
);
我自己做了一些調查,但一無所獲,解決了這個問題。我有附加的下載版本的鑲花文件包括課程。