无法在 azure data Lake gen1 中看到 Delta 表数据

问题描述 投票:0回答:1

我在 Azure 数据湖第 1 代中创建了一个增量表。但是,我无法通过天蓝色门户看到数据湖中的任何数据。 但是,当我在该增量表路径上运行“ls”命令时,我可以看到存在的文件。

代码是:

groupsUpdatePath = 'dbfs:/mnt/datalakeg2/referencedata/Groups.csv'

groupsUpdate = spark.read.csv(groupsUpdatePath,
                      inferSchema = 'true',
                      header = 'true',
                      mode="DROPMALFORMED",
                      timestampFormat="MM/dd/yyyy hh:mm:ss",
                      escape = "\"").distinct()

groupsUpdate.write.option("path", "/mnt/datalake/Experiments/Example").saveAsTable("exampleTable")

任何人都可以指导可能是什么问题吗? 谢谢

azure-databricks azure-data-lake delta-lake
1个回答
0
投票

以下是如何使用以下命令在 Azure Data Lake Storage Gen1 中写入增量表的示例: 作为 Chen Hirsh,这可能是一个权限问题。

#create mount point for ADLS gen 1
configs = {
   "fs.adl.oauth2.access.token.provider.type": "CustomAccessTokenProvider",
   "fs.adl.oauth2.access.token.custom.provider": spark.conf.get("spark.databricks.passthrough.adls.tokenProviderClassName")
 }

 dbutils.fs.mount(
   source = "adl://<storage-account-name>.azuredatalakestore.net/<directory-name>",
   mount_point = "/mnt/<mount-name>",
   extra_configs = configs)

#Write the file to ADLS gen 1 as delta table
groupsUpdate.write.option("path", "/mnt/mnt1sampledemo1").saveAsTable("exampleTable")

另转至 ADLS gen 1 帐户,转至数据浏览器 >> 访问。

enter image description here

检查您尝试访问的用户是否具有适当的权限。

enter image description here

我可以看到在 ADLS gen 1 文件夹的 Mountpoint 下创建了文件。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.