leonardBang commented on a change in pull request #17749:
URL: https://github.com/apache/flink/pull/17749#discussion_r754130028
##########
File path: docs/content/docs/connectors/table/filesystem.md
##########
@@ -328,15 +328,30 @@ Time extractors define extracting time from partition
values.
<td>String</td>
<td>The extractor class for implement PartitionTimeExtractor
interface.</td>
</tr>
+ <tr>
+ <td><h5>partition.time-extractor.formatter-pattern</h5></td>
+ <td style="word-wrap: break-word;">yyyy-MM-dd HH:mm:ss</td>
+ <td>String</td>
+ <td>When 'partition.time-extractor.kind' is set to 'default', you can
specify a formatter pattern to get a timestamp from partitions. <br>By default,
the format is 'yyyy-MM-dd HH:mm:ss'.
Review comment:
How about the name `timestamp-formatter` which has default value
'yyyy-MM-dd HH:mm:ss'? And it can combine with
`partition.time-extractor.timestamp-patter`, and it also should supports
multiple partition fields like ```$year$month$day```.
##########
File path: docs/content.zh/docs/connectors/table/filesystem.md
##########
@@ -276,18 +276,31 @@ file sink 支持文件合并,以允许应用程序可以使用较小的检查
<td>String</td>
<td>实现了接口 PartitionTimeExtractor 的提取器类.</td>
</tr>
+ <tr>
+ <td><h5>partition.time-extractor.formatter-pattern</h5></td>
+ <td style="word-wrap: break-word;">yyyy-MM-dd HH:mm:ss</td>
+ <td>String</td>
+
<td>指定时间格式化的类型。当'partition.time-extractor.kind'设置为'default'时,你可以指定分区字段的时间格式化类型。
<br>它的默认格式化类型是:'yyyy-MM-dd HH:mm:ss'.
+ <br>示例如下:
+ <br>'yyyy-MM-dd' -> '2018-07-14'
+ <br>'dd-MMM-yyyy' -> '14-Jul-2018'
+ <br>'E, MMM dd yyyy' -> 'Sat, Jul 14 2018'
+ <br>更多细节可参考: https://www.w3.org/QA/Tips/iso-date</td>
+ </tr>
<tr>
<td><h5>partition.time-extractor.timestamp-pattern</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>String</td>
- <td> 'default' 时间提取器允许用户从分区字段中提取合法的时间戳模式。默认支持从第一个字段按 'yyyy-mm-dd
hh:mm:ss' 时间戳模式提取。
+ <td> 'default' 时间提取器允许用户从分区字段中提取合法的时间戳模式。默认支持从第一个字段按 'yyyy-MM-dd
HH:mm:ss' 时间戳模式提取。
如果需要从一个分区字段比如 ‘dt’ 提取时间戳,可以配置为: '$dt';
如果需要从多个分区字段,比如 'year', 'month', 'day' 和
'hour'提取时间戳,可以配置为:'$year-$month-$day $hour:00:00';
如果需要从两字分区字段,比如 'dt' 和 'hour' 提取时间戳,可以配置为:'$dt $hour:00:00'.</td>
</tr>
</tbody>
</table>
+
+
默认的提取器是基于由分区字段组合而成的时间戳模式。你也可以指定一个实现了 `PartitionTimeExtractor` 接口的自定义的提取器。
Review comment:
please delete these
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]