Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Jon/bigquery timestamp support (#27)
Browse files Browse the repository at this point in the history
* Adding support for BigQuery timestamps without millisecond precision

* Setting jar manifest to the Apache Beam job

* Adding unit test for timestamp format

* Update pom.xml

Removing manifest configuration in pom.xml
  • Loading branch information
jontradesy authored and yu-iskw committed Dec 11, 2019
1 parent 7fddef4 commit 5857d3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ public static Instant parseTimestamp(String value) {
"yyyy-M-d H:m:s.SSS z",
"yyyy-M-d H:m:s.SS z",
"yyyy-M-d H:m:s.S z",
"yyyy-M-d H:m:s z",
"yyyy-M-d H:m:s.SSS",
"yyyy-M-d H:m:s.SS",
"yyyy-M-d H:m:s.S",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public void testIsTimestamp() {
assertNotNull(TableRow2EntityFn.parseTimestamp("2017-9-1 4:1:1.1 UTC"));
assertNotNull(TableRow2EntityFn.parseTimestamp("2017-9-1 4:1:1.12 UTC"));
assertNotNull(TableRow2EntityFn.parseTimestamp("2017-9-1 4:1:1.001 UTC"));
assertNotNull(TableRow2EntityFn.parseTimestamp("2019-03-13 22:00:20 UTC"));

assertNotNull(TableRow2EntityFn.parseTimestamp("2017-09-16 04:14:37.844 PST"));
assertNotNull(TableRow2EntityFn.parseTimestamp("2017-09-16 04:14:37.844 JST"));
Expand Down

0 comments on commit 5857d3b

Please sign in to comment.