You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/08/24 21:24:09 UTC

[GitHub] [iceberg] jiegzhan opened a new issue #1372: Can not create table with Spark 2.4 DataFrame

jiegzhan opened a new issue #1372:
URL: https://github.com/apache/iceberg/issues/1372


   Started spark-shell on EMR (Spark 2.4) with this command: 
   ```
   spark-shell \
     --jars /usr/lib/iceberg/iceberg-spark-runtime-0.9.1.jar \
     --conf spark.sql.catalog.spark_catalog=org.apache.iceberg.spark.SparkSessionCatalog \
     --conf spark.sql.catalog.spark_catalog.type=hive
   ```
   
   Create table script failed:
   ```
   scala> df.
        |   write.
        |   format("iceberg").
        |   mode("overwrite").
        |   save("default.iceberg_test")
   org.apache.iceberg.exceptions.NoSuchTableException: Table does not exist: default.iceberg_test
     at org.apache.iceberg.BaseMetastoreCatalog.loadTable(BaseMetastoreCatalog.java:141)
     at org.apache.iceberg.spark.source.IcebergSource.findTable(IcebergSource.java:142)
     at org.apache.iceberg.spark.source.IcebergSource.getTableAndResolveHadoopConfiguration(IcebergSource.java:171)
     at org.apache.iceberg.spark.source.IcebergSource.createWriter(IcebergSource.java:95)
     at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:254)
     at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:228)
     ... 53 elided
   ```
   
   On [iceberg document website](https://iceberg.apache.org/spark/#writing-with-dataframes), there's appending and overwriting data with Spark 2.4 DataFrame, but there's no creating table with Spark 2.4 DataFrame.
   ![Screen Shot 2020-08-24 at 2 19 42 PM](https://user-images.githubusercontent.com/10664626/91097801-38363600-e615-11ea-9fb4-6a4f26f2a038.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] zhangdove commented on issue #1372: Can not create table with Spark 2.4 DataFrame

Posted by GitBox <gi...@apache.org>.
zhangdove commented on issue #1372:
URL: https://github.com/apache/iceberg/issues/1372#issuecomment-679943269


   If I understand correctly, Spark 2.4 does not support creating tables in SQL [spark guide](https://iceberg.apache.org/spark/#spark).
   
   Maybe you can use the Iceberg API to build table and then write data [createTable](https://iceberg.apache.org/java-api-quickstart/#create-a-table).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org