2016-12-16 64 views
0

我嘗試使用Azure Data Factory將表存儲中的數據推送到Azure Data Lake Store。並在數據工廠。如何將日期時間附加到由數據工廠發佈到Azure Data Lake Store的文件名?

我定義了輸出實體並嘗試將datetime添加到輸出文件,但似乎不起作用。

請參見下面的代碼:

*"published": false, 
     "type": "AzureDataLakeStore", 
     "linkedServiceName": "Destination-DataLakeStore-bwb", 
     "typeProperties": { 
      "fileName": "tbTotalTollData{year}{Month}{Day}{Hour}", 
      "folderPath": "Samples", 
      "format": { 
       "type": "TextFormat", 
       "columnDelimiter": "," 
      } 
     } 

使用{year}{Month}{Day}{Hour}爲文件名,但不能工作。

回答

0

應該聲明上述代碼中使用的變量year,Month,Day。更新代碼如下,然後重試*"published": false, "type": "AzureDataLakeStore", "linkedServiceName": "Destination-DataLakeStore-bwb", "typeProperties": { "fileName": "tbTotalTollData{year}{Month}{Day}{Hour}", "folderPath": "Samples", "format": { "type": "TextFormat", "columnDelimiter": "," } }, "partitionedBy": [ { "name": "Year", "value": { "type": "DateTime", "date": "SliceStart", "format": "yyyy" } }, { "name": "Month", "value": { "type": "DateTime", "date": "SliceStart", "format": "MM" } }, { "name": "Day", "value": { "type": "DateTime", "date": "SliceStart", "format": "dd" } }, { "name": "Hour", "value": { "type": "DateTime", "date": "SliceStart", "format": "hh" } } ]

相關問題