ADLS Gen 1中DELTA格式文件的外部表

问题描述

我们在ADLS Gen1上创建了许多数据砖DELTA表。而且,在databricks工作区之一的每个表之上都构建有外部表。

类似地,我试图在相同的DELTA格式文件上创建相同类型的外部表,但是在不同的工作空间中。
我确实具有通过ADLS Gen1上的服务原理进行的只读访问。因此,我可以通过spark数据帧读取DELTA文件,如下所示:

read_data_df = spark.read.format("delta").load('dbfs:/mnt/data/<foldername>')

我什至可以创建配置单元外部表,但从同一表读取数据时确实看到以下警告:


Error in sql statement: AnalysisException: Incompatible format detected.

A transaction log for Databricks Delta was found at `dbfs:/mnt/data/<foldername>/_delta_log`,but you are trying to read from `dbfs:/mnt/data/<foldername>` using format("hive"). 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.microsoft.com/azure/databricks/delta/index
;

如果我'使用DELTA'创建外部表,那么我将看到另一个访问错误,如下所示:

Caused by: org.apache.hadoop.security.AccessControlException: 
OPEN Failed with error 0x83090aa2 (Forbidden. ACL verification Failed. 
Either the resource does not exist or the user is not authorized to perform the requested operation.). 
Failed with error 0x83090aa2 (Forbidden. ACL verification Failed.
Either the resource does not exist or the user is not authorized to perform the requested operation.). 

这是否意味着我需要对文件系统下的文件进行完全访问,而仅需要只读??

谢谢

解决方法

在升级到Databricks Runtime环境到运行时版本DBR-7.3之后解决。