gpt4 book ai didi

azure 数据工厂从容器递归复制

转载 作者:行者123 更新时间:2023-12-03 01:50:44 29 4
gpt4 key购买 nike

您好,我正在使用 Azure 数据工厂进行复制事件。我希望副本在容器及其子文件夹中递归,如下所示:myfolder/年/月/日/小时}/New_Generate_File.csv

我生成并导入到文件夹中的文件始终具有不同的名称。

问题是事件似乎永远在等待。

管道每小时安排一次。

我附加了数据集和链接服务的 json 代码。

数据集:

{
"name": "Txns_In_Blob",
"properties": {
"structure": [
{
"name": "Column0",
"type": "String"
},
[....Other Columns....]
],
"published": false,
"type": "AzureBlob",
"linkedServiceName": "LinkedService_To_Blob",
"typeProperties": {
"folderPath": "uploadtransactional/yearno={Year}/monthno={Month}/dayno={Day}/hourno={Hour}/{Custom}.csv",
"format": {
"type": "TextFormat",
"rowDelimiter": "\n",
"columnDelimiter": " "
}
},
"availability": {
"frequency": "Hour",
"interval": 1
},
"external": true,
"policy": {}
}

}

链接服务:

{
"name": "LinkedService_To_Blob",
"properties": {
"description": "",
"hubName": "dataorchestrationsystem_hub",
"type": "AzureStorage",
"typeProperties": {
"connectionString": "DefaultEndpointsProtocol=https;AccountName=wizestorage;AccountKey=**********"
}
}

}

最佳答案

不强制要求在数据集的 folderPath 属性中提供文件名。只需删除文件名,然后数据工厂就会为您加载所有文件。

{
"name": "Txns_In_Blob",
"properties": {
"structure": [
{
"name": "Column0",
"type": "String"
},
[....Other Columns....]
],
"published": false,
"type": "AzureBlob",
"linkedServiceName": "LinkedService_To_Blob",
"typeProperties": {
"folderPath": "uploadtransactional/yearno={Year}/monthno={Month}/dayno={Day}/hourno={Hour}/",
"partitionedBy": [
{ "name": "Year", "value": { "type": "DateTime", "date": "SliceStart", "format": "yyyy" } },
{ "name": "Month", "value": { "type": "DateTime", "date": "SliceStart", "format": "%M" } },
{ "name": "Day", "value": { "type": "DateTime", "date": "SliceStart", "format": "%d" } },
{ "name": "Hour", "value": { "type": "DateTime", "date": "SliceStart", "format": "hh" } }
],
"format": {
"type": "TextFormat",
"rowDelimiter": "\n",
"columnDelimiter": " "
}
},
"availability": {
"frequency": "Hour",
"interval": 1
},
"external": true,
"policy": {}
}

使用上面的folderPath它将生成运行时值uploadtransactional/yearno=2016/monthno=05/dayno=30/hourno=07/ 用于现在执行 UTC 时区的管道

关于 azure 数据工厂从容器递归复制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37517454/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com