我有一个设置了两个存储的 ADL 帐户:设置为默认值的常规 ADLS gen1 存储和启用了“分层命名空间”的 Blob 存储,如果重要的话,可以使用存储 key 连接到 ADLS(没有托管身份)这点)。第一个与问题无关,只是为了这个问题,第二个以 testdlsg2
的名称注册。我在 Azure 门户的数据资源管理器中看到了这两个内容。
现在,我在该 blob 存储中有一个名为 logs
的容器,在该容器的根目录中有我想要处理的日志文件。
如何从 U-SQL 引用特定存储和特定容器中的这些文件?
我已阅读 ADLS Gen2 URI documentation并提出了以下 U-SQL:
@data =
EXTRACT
Timestamp long,
// skip, skip, skip
LogDate DateTime,
LogOrder int
FROM "abfss://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="abc7c4ccd8ebdfced8dfcfc7d8cc9985cfcdd885c8c4d9ce85dcc2c5cfc4dcd885c5cedf" rel="noreferrer noopener nofollow">[email protected]</a>/log_{LogDate:yyyy}{LogDate:MM}{LogDate:dd}_{LogOrder}.log.gz"
USING Extractors.Text(delimiter: ' ', quoting: true, skipFirstNRows: 1);
// the rest is irrelevant
不幸的是,当我将其提交给 ADL 时,作业失败并出现以下错误:
CsEnumerateDirectoryWithPaging failed with error 0x83090A1A (The operation is not supported on the provided Url type). Cosmos Path: abfss://[email protected]/
当使用带有相对路径的本地存储时,查询在本地工作正常。
最佳答案
根据评论,U-SQL 无法与 Azure Data Lake Gen 2 配合使用,而且也不太可能配合使用。您应该阅读以下反馈项目:
在 2020 年,考虑使用 Azure Databricks 启动新的 Azure 分析项目。
关于azure - 从 U-SQL 引用 ADL 存储 gen2 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61402380/