复制到 Azure Data Factory V2 时如何从 blob 访问文件名

How to access the filename from a blob while copying into Azure Data Factory V2

我正在尝试使用数据工厂从 Azure Data Lake Storage Gen 2 的文件夹中复制一堆文件。我需要访问我在运行时复制的 blob 的文件名,以便我可以检查它并解析名称以检索重要的元数据。不幸的是,我没有看到使用 Azure 上的数据工厂 V2 来执行此操作的方法。如果有人知道如何执行此操作,请与我分享,将不胜感激。

您可以了解 Azure 数据工厂中的 Get Metadata Activity,它可用于检索 Azure 数据工厂中任何数据的元数据。

但是,目前只支持以下连接器:

由于您的数据存储在 ADL Gen2 中,您可以尝试将数据从 ADL Gen2 传输到 Azure Blob Storage.Then 使用元数据 Activity 访问文件夹中的文件名: https://docs.microsoft.com/en-us/azure/data-factory/control-flow-get-metadata-activity#get-a-folders-metadata