始终与 GetMetadata 一起存在 returns true

Exists with GetMetadata always returns true

使用 V2,我试图找出一个文件夹是否存在于 Azure blob 存储中(我知道 'folder' 是一个伪名称,因为它只是文件的一部分 url).当我尝试这样做时,无论文件夹是否存在,它总是 return 正确。

下面是一个示例,它应该 return 为假,但 return 为真。文件夹路径 "test/2018/5/25" 不存在,但获取元数据 returns "exists: true, itemName: 25"。其他文件夹路径存在,如“test/2018/5/24,但以25结尾的不存在,因为没有25号的数据。

有什么想法吗?

流水线

{
"name": "Testing",
"properties": {
    "activities": [
        {
            "name": "Get Metadata1",
            "type": "GetMetadata",
            "policy": {
                "timeout": "7.00:00:00",
                "retry": 0,
                "retryIntervalInSeconds": 30,
                "secureOutput": false
            },
            "typeProperties": {
                "dataset": {
                    "referenceName": "metdatatest",
                    "type": "DatasetReference"
                },
                "fieldList": [
                    "itemName",
                    "exists"
                ]
            }
        }
    ]
  }
}

数据集

{
"name": "metdatatest",
"properties": {
    "linkedServiceName": {
        "referenceName": "xxx",
        "type": "LinkedServiceReference"
    },
    "type": "AzureBlob",
    "typeProperties": {
        "format": {
            "type": "TextFormat",
            "columnDelimiter": "\t",
            "nullValue": "\N",
            "treatEmptyAsNull": true,
            "skipLineCount": 1,
            "firstRowAsHeader": false
        },
        "fileName": "",
        "folderPath": "test/2018/5/25"
    }
  }
}

我可以重现,这是一个错误。目前returns它的容器是否存在,但没有检查这个"virtual"文件夹是否存在。

由于blob没有文件夹的概念,为了知道是否存在这样的文件夹,需要进行文件搜索以检查该文件夹下是否有文件,这可能会导致性能问题.我会回到 PROD 团队。请继续关注...