Json Azure数据工厂-通过剥离日期时间更改文件名
我有一个管道设置,它从blob获取一个文件名列表,将变量设置为ARAY来执行此操作,然后用一个新名称复制到新位置。例如,中的文件可能是scottdatetest_01_01_20.txt,我需要scottdatetest.txt 我的JSOn如下所示,输出显示它做了我想要的事情,但是文件已经以与源文件相同的名称到达接收器。我缺少什么来让它写出输出中显示的名称Json Azure数据工厂-通过剥离日期时间更改文件名,json,azure,pipeline,azure-data-factory,Json,Azure,Pipeline,Azure Data Factory,我有一个管道设置,它从blob获取一个文件名列表,将变量设置为ARAY来执行此操作,然后用一个新名称复制到新位置。例如,中的文件可能是scottdatetest_01_01_20.txt,我需要scottdatetest.txt 我的JSOn如下所示,输出显示它做了我想要的事情,但是文件已经以与源文件相同的名称到达接收器。我缺少什么来让它写出输出中显示的名称 "typeProperties": { "source": {
"typeProperties": {
"source": {
"type": "DelimitedTextSource",
"storeSettings": {
"type": "AzureBlobStorageReadSettings",
"recursive": true,
"wildcardFileName": "*",
"enablePartitionDiscovery": false
},
"formatSettings": {
"type": "DelimitedTextReadSettings"
}
},
"sink": {
"type": "DelimitedTextSink",
"storeSettings": {
"type": "AzureBlobStorageWriteSettings",
"copyBehavior": {
"value": "@substring(string(variables('Filenames')),0,indexof(string(variables('Filenames')),'_'))",
"type": "Expression"
}
},
"formatSettings": {
"type": "DelimitedTextWriteSettings",
"quoteAllText": true,
"fileExtension": ".txt"
}
},
"enableStaging": false
},
"inputs": [
{
"referenceName": "DelimitedText1",
"type": "DatasetReference"
}
],
"outputs": [
{
"referenceName": "DelimitedText2",
"type": "DatasetReference"
}
]
},
调试的输出:
},
"sink": {
"type": "DelimitedTextSink",
"storeSettings": {
"type": "AzureBlobStorageWriteSettings",
"copyBehavior": "[{\"name\":\"scottdatetest"
},
"formatSettings": {
"type": "DelimitedTextWriteSettings",
"quoteAllText": true,
"fileExtension": ".txt"
}
另外,我想对多个文件运行此操作,我已尝试并获得以下输出,看起来它试图将其写入1个文件,而不是文件夹:
{
“来源”:{
“类型”:“DelimitedTextSource”,
“存储设置”:{
“类型”:“azureblobstorageradsettings”,
“递归”:正确,
“enablePartitionDiscovery”:false,
“前缀:”[{“名称”:“BUPAUKStandardInvoicePartnerConnectorExpense\u 1252\u 011020.csv\”,“类型\”:“文件\”},{“名称\:“BUPAUKStandardInvoicePartnerConnectorMiscFee\u 1254\u 011020.csv\”,“类型\:“文件\”]
},
“格式设置”:{
“类型”:“DelimitedTxtReadSettings”
}
},
“水槽”:{
“类型”:“DelimitedTextSink”,
“存储设置”:{
“类型”:“AzureBlobStorageWriteSettings”,
“copyBehavior:”[{\“name\”:\“BUPAUKStandardInvoicePartnerConnectorExpense.csv”
},
“格式设置”:{
“类型”:“DelimitedTextWriteSettings”,
“quoteAllText”:正确,
“文件扩展名”:“.csv”
}
},
“enableStaging”:false
}为了添加,我尝试对多个文件执行此操作,他们似乎只想回写1文件,以下是调试运行的输出:为了添加,我尝试对多个文件执行此操作,他们似乎只想回写1文件,以下是调试运行的输出: