Delta table cannot be previewed in the Data UI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2023 03:49 AM
I have saved a delta table which I can read using `spark.table(table_name)`. However, when I go to the "Data" panel in databricks I get an error when I choose that table.
An error occurred while fetching table: <table_name>
com.databricks.backend.common.rpc.DatabricksExceptions$SQLExecutionException: org.apache.spark.sql.AnalysisException: Incompatible format detected.
A transaction log for Databricks Delta was found at `<path>/_delta_log`,
but you are trying to read from `<path>` using format("parquet"). You must use
'format("delta")' when reading and writing to a delta table.
To disable this check, SET spark.databricks.delta.formatCheck.enabled=false
To learn more about Delta, see https://docs.databricks.com/delta/index.html
- Labels:
-
Delta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2023 09:40 PM
Hi, It can be an issue with Hive Metastore. Could you please recheck the configuration and also let us know if you are using external metastore?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2023 01:43 AM
I don't know. The way I have saved the table was with autoloader as follows:
I am saving a structure stream into a table using:
```
.writeStream
.format("delta") # <-----------
.option("checkpointLocation", checkpoint_path)
.option("path", output_path)
.trigger(availableNow=True)
.toTable(table_name, format='delta'))
```
Yet the produced table seems not to be a delta one as I cannot read it in Redash, nor the Data preview feature in databricks. Moreover if I run delta.DeltaTable.isDeltaTable(spark, TABLE_NAME) it returns False.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2023 04:02 PM
did you wrote any data? did your micro-batch process any data? you can check if you do "%sql describe extended <delta_table_name>" in the output you will find the path to the location in which your data is located. Then you can try to list the data in that path. You need to have a _delta_log file in there

