azure - 从 U-SQL 引用 ADL 存储 gen2 文件

标签 azure azure-data-lake u-sql azure-data-lake-gen2

我有一个设置了两个存储的 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 配合使用,而且也不太可能配合使用。您应该阅读以下反馈项目:

https://feedback.azure.com/forums/327234-data-lake/suggestions/36445702-add-support-for-adls-gen2-to-adla

在 2020 年,考虑使用 Azure Databricks 启动新的 Azure 分析项目。

关于azure - 从 U-SQL 引用 ADL 存储 gen2 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61402380/

相关文章:

Azure Functions - Blob 绑定(bind)中的动态 Blob 容器

azure - .Net Core MVC 中安全服务请求的双向 SSL X509 证书位置 - Azure 服务托管应用程序

rest - 使用 REST API 上传 block 中的 Blob 在第二个 block 上超时

azure - 如何限制服务主体对 ADLS Gen2 中特定文件夹的访问?

.net - SDK更新后U-SQL脚本无法编译

Azure 数据湖 - HDInsight 与数据仓库

Azure Active Directory OAuth 资源所有者密码凭据流程

python - 重命名写入的 CSV 文件 Spark 抛出错误 "Path must be absolute"- Azure Data Lake

azure - u-sql 中的数据类型转换和连接列