[英]Azure Data Factory V2 - Cannot combine wildcard filenames with dynamic content filepath. Is there a databricks (ADB) solution or another ADF solution?
我目前有一個上游進程,將幾乎隨機數量的.zip文件轉儲到Azure Data Lake Storage,每個文件夾的名稱類似於FILES / PROCESSING / 2019/04/19。
我創建了一個Azure數據工廠V2(ADF)復制數據流程來動態抓取“今天”文件路徑中的任何文件,但是組合動態內容文件路徑和通配符文件名存在支持問題,如下所示。
在ADF中有解決方法嗎?
謝謝!
這是我的Linked Service的動態文件路徑,帶有通配符文件名:
FILES/PROCESSING/@formatDateTime(utcnow(),'yyyy')/@formatDateTime(utcnow(),'mm')/@formatDateTime(utcnow(),'dd')
而通配符是:
/*.zip
我希望該進程運行,但反而得到此錯誤消息:
Activity CopyNewFiles failed: Failure happened on 'Source' side. ErrorCode=UserErrorFileNotFound,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot find the 'Azure Data Lake Store' file. . Service request id: c0266e28-d841-40b7-b177-e67d5e5388a1 Response details: {"RemoteException":{"exception":"FileNotFoundException","message":"File/Folder does not exist: /FILES/PROCESSING/2019/04/30 [c0266e28-d841-40b7-b177-e67d5e5388a1][2019-04-30T12:08:55.0353825-07:00]","javaClassName":"java.io.FileNotFoundException"}},Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The remote server returned an error: (404) Not Found.,Source=System,'
只存在文件路徑。 如果我運行手動過程直接指向沒有動態內容的文件,它運行得很好。
我查看了ADF文檔,試圖查看這是否是一個已知錯誤,我沒有看到任何符合該法案的內容。
這應該在你的道路上工作:
@Concat('FILES/PROCESSING/',utcnow('yyyy/MM/dd'))
和*.zip
文件位。
一開始只有一個@。
您可以在公式中嵌入函數,就像您擁有的一樣,但是您需要在每個管道位周圍放置花括號,如下所示,然后直接將值替換為代碼而不使用concat:
FILES/PROCESSING/@{formatDateTime(utcnow(),'yyyy')}/@{formatDateTime(utcnow(),'MM')}/@{formatDateTime(utcnow(),'dd')}/*.zip
也注意資本MM的月份,mm是分鍾:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.