You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "luke de feo (Jira)" <ji...@apache.org> on 2021/02/23 17:13:00 UTC

[jira] [Commented] (BEAM-10473) RowJson should support DATETIME

    [ https://issues.apache.org/jira/browse/BEAM-10473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17289195#comment-17289195 ] 

luke de feo commented on BEAM-10473:
------------------------------------

this would be really useful for us, same for the serialisation side, it would be nice you could set how to serialise datetimes

> RowJson should support DATETIME
> -------------------------------
>
>                 Key: BEAM-10473
>                 URL: https://issues.apache.org/jira/browse/BEAM-10473
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Jacob Ferriero
>            Priority: P3
>              Labels: Clarified
>
> Add support for DATETIME types to support adding an 
>  interface to JsonToRow that accepts a joda DateTimeFormatter for parsing DateTime JSON string fields or specifies a behavior for treating numbers as unix timestamps.
> This is crucial for SQL pipelines processing streaming data with timestamps.
> The interface might look something lik this:
> {code:java}
> /** For parsing JSON string fields containing dates to DATETIME in the target schema */
> JsonToRow::withDateTimeFormatter(org.joda.time.format.DateTimeFormatter)
> /** For parsing JSON number fields containing milliseconds since UNIX epoch that are listed as DATETIME in the target schema*/
> JsonToRow::usingUnixMillis()
> /** For parsing JSON number fields containing seconds since UNIX epoch that are listed as DATETIME in the target schema*/
> JsonToRow::usingUnixSeconds()
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)