01-04-2024 02:42 PM
Hi all, I am trying to Read an external Iceberg table. A separate spark sql script creates my Iceberg table and now i need to read the Iceberg tables(created outside of databricks) from my Databricks notebook. Could someone tell me the approach for that. I tried using spark.read.format("iceberg").load("s3://path to my Iceberg data folder") but getting error. Any help would be appreciated
01-05-2024 12:21 AM
Have you installed the jar to be able to read iceberg?
https://www.dremio.com/blog/getting-started-with-apache-iceberg-in-databricks/
You can also try to use the Uniform format, if that is possible of course.
https://docs.databricks.com/en/delta/uniform.html
01-05-2024 10:27 AM
Hi @-werners-
I am using Databricks Runtime 10.4 ( Spark 3.2 ), so I have downloaded “iceberg-spark-runtime-3.2_2.12”
Also the table exists in the S3 bkt.
The error msg is: java.util.NoSuchElementException: None.get
I am also attaching a screenshot for reference.
01-09-2024 08:01 AM
You also need to configure the cluster, according to the blog.
If that still does not work, can you try with a recent LTS release, like 13.3 f.e.?
01-09-2024 08:07 AM
Hi @-werners- the cluster was provisioned with all the requirements as stated in the doc. I also tried with runtime 13.2 and corresponding Iceberg Jar, this time only the error message changed(which is more informative now) but still Databricks is not able to read the Iceberg tables in S3 with catalog as Glue catalog. The error says: AnalysisException: [TABLE_OR_VIEW_NOT_FOUND] as it is not able to read from the Glue catalog. I also provisioned the instance profile for access to Glue and S3 bucket
01-18-2024 01:06 PM
Hi @Retired_mod yes the iceberg table does not exist in the default catalog because its created externally(outside of Databricks) by a separate spark sql script. The catalog it uses is Glue catalog. The ques is how can i access that external iceberg table from with in my Databricks notebook
08-20-2024 04:39 PM
HI @Ambesh did you solve this eventually? I am getting the same error AnalysisException: [TABLE_OR_VIEW_NOT_FOUND]
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group