因此,只需跟隨下面的內容來展示Derek的答案如何幫助我解決大量行以獲取FTP服務器上的文件。我最終使用了執行存儲過程操作的輸出主體,因爲GetRows操作被限制爲512行。
注意:由於表格操作在設計器中不可用,但是,請在代碼查看器中執行所有操作,打開設計器導致出現問題並在一個點刪除所有代碼。
"actions": {
"Create_file": {
"inputs": {
"body": "@body('tableCsv0')",
"host": {
"api": {
"runtimeUrl": "https://logic-apis-northeurope.azure-apim.net/apim/ftp"
},
"connection": {
"name": "@parameters('$connections')['ftp']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/files",
"queries": {
"folderPath": "transactions/ready/ecommerce/tickets_test/",
"name": "[email protected]{formatDateTime(utcNow(),'yyyyMMdd_hhmmss')}.csv"
}
},
"runAfter": {
"tableCsv0": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Execute_stored_procedure": {
"inputs": {
"host": {
"api": {
"runtimeUrl": "https://logic-apis-northeurope.azure-apim.net/apim/sql"
},
"connection": {
"name": "@parameters('$connections')['sql']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/procedures/@{encodeURIComponent(encodeURIComponent('[Scheduledjob].[GetBArcodesForGRMA]'))}"
},
"runAfter": {},
"type": "ApiConnection"
},
"tableCsv0": {
"inputs": {
"columns": [
{
"header": "EventDateTime",
"value": "@item()?['EventDateTime']"
},
{
"header": "EventName",
"value": "@item()?['EventName']"
}
],
"format": "csv",
"from": "@body('Execute_stored_procedure')['ResultSets']['Table1']"
},
"runAfter": {
"Execute_stored_procedure": [
"Succeeded"
]
},
"type": "Table"
}
設計師支持應該很快就會到來,但在此之前你會得到一個新功能的尖峯。 :)我們還計劃增加從Get Rows返回的行數的限制,並且您在使用存儲過程作爲解決方法時是正確的。 –