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/11/12 11:47:28 UTC
[GitHub] [iceberg] chaiyuan2046 opened a new issue #1756: iceberg is not a valid Spark SQL Data Source
chaiyuan2046 opened a new issue #1756:
URL: https://github.com/apache/iceberg/issues/1756
spark : spark-3.0.1-bin-hadoop2.7
iceberg : iceberg-spark3-runtime-0.9.1.jar
==============================================
**Step one:**
bin/spark-sql \
--conf spark.sql.warehouse.dir=hdfs://xxxx:8020/user/iceberg
**Step two:**
CREATE TABLE ib_test(id bigint, data string) USING iceberg; --success
**Step three:**
select * from ib_test; --The error blow happens:
Caused by: org.apache.spark.sql.AnalysisException: iceberg is not a valid Spark SQL Data Source.;
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:421)
at org.apache.spark.sql.execution.datasources.FindDataSourceTable.$anonfun$readDataSourceTable$1(DataSourceStrategy.scala:256)
at org.sparkproject.guava.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4792)
at org.sparkproject.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
at org.sparkproject.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
... 96 more
Any ideas for this question?tks
----------------------------------------------------------------
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] shiyuhang0 commented on issue #1756: iceberg is not a valid Spark SQL Data Source
Posted by GitBox <gi...@apache.org>.
shiyuhang0 commented on issue #1756:
URL: https://github.com/apache/iceberg/issues/1756#issuecomment-1055665211
> This occurs because of a bad error message in Spark. What it really means is that you attempted to read the table using a datasource v1 read path when the datasource in question is a v2 one. This is occuring because you are using the native spark session catalog rather than the iceberg v2 replacement session catalog. So from here you have a two options I think, You can override the session catalog with the iceberg V2 session catalog You can read the table using the v2 path explicitly, spark.read.table()
> […](#)
> On Thu, Nov 12, 2020, 5:47 AM chaiyuan2046 ***@***.***> wrote: spark : spark-3.0.1-bin-hadoop2.7 iceberg : iceberg-spark3-runtime-0.9.1.jar ============================================== *Step one:* bin/spark-sql --conf spark.sql.warehouse.dir=hdfs://xxxx:8020/user/iceberg *Step two:* CREATE TABLE ib_test(id bigint, data string) USING iceberg; --success *Step three:* select * from ib_test; --The error blow happens: Caused by: org.apache.spark.sql.AnalysisException: iceberg is not a valid Spark SQL Data Source.; at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:421) at org.apache.spark.sql.execution.datasources.FindDataSourceTable.$anonfun$readDataSourceTable$1(DataSourceStrategy.scala:256) at org.sparkproject.guava.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4792) at org.sparkproject.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599) at org.sparkproject.guava.cache.LocalCache$Segment.loadSync(Local
Cache.java:2379) ... 96 more Any ideas for this question?tks — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1756>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADE2YPBNYRXGD3YDBWJ5PDSPPDM7ANCNFSM4TTFYMWQ> .
I am new to use spark and I would like to know how to `override the session catalog with the iceberg V2 session catalog`
--
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.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
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] RussellSpitzer commented on issue #1756: iceberg is not a valid Spark SQL Data Source
Posted by GitBox <gi...@apache.org>.
RussellSpitzer commented on issue #1756:
URL: https://github.com/apache/iceberg/issues/1756#issuecomment-894206886
Are your referring to your tables as local.database.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.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
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] RussellSpitzer commented on issue #1756: iceberg is not a valid Spark SQL Data Source
Posted by GitBox <gi...@apache.org>.
RussellSpitzer commented on issue #1756:
URL: https://github.com/apache/iceberg/issues/1756#issuecomment-726072991
This occurs because of a bad error message in Spark. What it really means
is that you attempted to read the table using a datasource v1 read path
when the datasource in question is a v2 one. This is occuring because you
are using the native spark session catalog rather than the iceberg v2
replacement session catalog.
So from here you have a two options I think,
You can override the session catalog with the iceberg V2 session catalog
You can read the table using the v2 path explicitly, spark.read.table()
On Thu, Nov 12, 2020, 5:47 AM chaiyuan2046 <no...@github.com> wrote:
> spark : spark-3.0.1-bin-hadoop2.7
> iceberg : iceberg-spark3-runtime-0.9.1.jar
>
> ==============================================
> *Step one:*
> bin/spark-sql
> --conf spark.sql.warehouse.dir=hdfs://xxxx:8020/user/iceberg
>
> *Step two:*
> CREATE TABLE ib_test(id bigint, data string) USING iceberg; --success
>
> *Step three:*
> select * from ib_test; --The error blow happens:
>
> Caused by: org.apache.spark.sql.AnalysisException: iceberg is not a valid
> Spark SQL Data Source.;
> at
> org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:421)
> at
> org.apache.spark.sql.execution.datasources.FindDataSourceTable.$anonfun$readDataSourceTable$1(DataSourceStrategy.scala:256)
> at
> org.sparkproject.guava.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4792)
> at
> org.sparkproject.guava.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
> at
> org.sparkproject.guava.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
> ... 96 more
>
> Any ideas for this question?tks
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/iceberg/issues/1756>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADE2YPBNYRXGD3YDBWJ5PDSPPDM7ANCNFSM4TTFYMWQ>
> .
>
----------------------------------------------------------------
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] codope commented on issue #1756: iceberg is not a valid Spark SQL Data Source
Posted by GitBox <gi...@apache.org>.
codope commented on issue #1756:
URL: https://github.com/apache/iceberg/issues/1756#issuecomment-894158512
@RussellSpitzer @chaiyuan2046 I am facing this issue as well with EMR spark (EMR 6.2, Spark 3.0.1). Create succeeds but the insert fails with the same exception. Could you please point the right set of confis? My configuration is as below.
```
spark-sql --packages org.apache.iceberg:iceberg-spark3-runtime:0.11.1\
--conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions \
--conf spark.sql.catalog.local=org.apache.iceberg.spark.SparkCatalog \
--conf spark.sql.catalog.local.type=hadoop \
--conf spark.sql.catalog.local.warehouse=$PWD/warehouse
```
--
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.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
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] codope commented on issue #1756: iceberg is not a valid Spark SQL Data Source
Posted by GitBox <gi...@apache.org>.
codope commented on issue #1756:
URL: https://github.com/apache/iceberg/issues/1756#issuecomment-894220115
> Are your referring to your tables as local.database.table?
@RussellSpitzer Thank you so much. Your comment helped! I was actually referring to my tables as `local.db.table`. I changed that to `local.default.table` because `show current namespace` listed `default` as the database. It worked!
I think this issue can be closed. For completeness, I will mention below the SQLs that worked with the configs I set.
```
CREATE TABLE local.default.t1 (id bigint, data string) USING iceberg;
INSERT INTO local.default.t1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
```
After this goto the location (specified in `spark.sql.catalog.local.warehouse`) on the namenode and the data as well as metadata should be visible under `$PWD/warehouse/default/t1`.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
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] szehon-ho commented on issue #1756: iceberg is not a valid Spark SQL Data Source
Posted by GitBox <gi...@apache.org>.
szehon-ho commented on issue #1756:
URL: https://github.com/apache/iceberg/issues/1756#issuecomment-1055748098
I think this will be done when you follow the steps in the Spark Getting Started Guide: https://iceberg.apache.org/docs/latest/getting-started/
--
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.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
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