![](/img/trans.png)
[英]Azure Data Factory Copy Activity fails converting MongoDB ISODate to DateTime v2 connector
[英]Read container names of an Azure blob in Data Factory V2
我的Data Factory V2管道從Azure Blob導入CSV文件。
Data Factory V2中有什么方法可以自動讀取CSV文件所來自的容器的名稱? 我搜索將它們移交給Microsoft SQL Server和/或將其保存在流式CSV數據本身中。
就像注釋中提到的那樣,Azure Blob存儲中沒有名為文件夾的東西。 您只能獲取容器的名稱。
基於Azure數據工廠REST API ,您可以從dataset
響應主體獲取folderPath
。
樣本:
{
"id": "/subscriptions/12345678-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset",
"name": "exampleDataset",
"properties": {
"type": "AzureBlob",
"typeProperties": {
"folderPath": {
"value": "@dataset().MyFolderPath",
"type": "Expression"
},
"fileName": {
"value": "@dataset().MyFileName",
"type": "Expression"
},
"format": {
"type": "TextFormat"
}
},
"description": "Example description",
"linkedServiceName": {
"referenceName": "exampleLinkedService",
"type": "LinkedServiceReference"
},
"parameters": {
"MyFolderPath": {
"type": "String"
},
"MyFileName": {
"type": "String"
}
}
},
"etag": "280320a7-0000-0000-0000-59b9712a0000"
}
或者,您可以在Azure Data Factory SDK中獲得該屬性。 然后,您可以將名稱保存到Microsoft SQL Server中。
希望對您有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.