cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Reading external Iceberg table

Ambesh
New Contributor III

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

6 REPLIES 6

-werners-
Esteemed Contributor III

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

Ambesh
New Contributor III

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. 

-werners-
Esteemed Contributor III

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.?

Ambesh
New Contributor III

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 

Kaniz
Community Manager
Community Manager

Hi @Ambesh, the table or view youโ€™re trying to access does not exist in the catalog. This could be due to a variety of reasons, such as incorrect table/view name, incorrect catalog configuration, or insufficient permissions.

Ambesh
New Contributor III

Hi @Kaniz 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