2016-12-16 71 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" } } ]

相关问题