You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2025/12/30 16:20:00 UTC
[jira] [Commented] (NIFI-15305) PutDatabaseRecord Timestamp Inconsistent Parsing
[ https://issues.apache.org/jira/browse/NIFI-15305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048411#comment-18048411 ]
ASF subversion and git services commented on NIFI-15305:
--------------------------------------------------------
Commit 0018851cb3cb4ff5f8a9049b93a0dc1653930df1 in nifi's branch refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0018851cb3 ]
NIFI-15305 Fixed Date Time conversion for floating point as string
- Added check for integral numbers greater than expected number of seconds for year 10,000 and handled as milliseconds
Signed-off-by: Pierre Villard <pi...@gmail.com>
This closes #10697.
> PutDatabaseRecord Timestamp Inconsistent Parsing
> ------------------------------------------------
>
> Key: NIFI-15305
> URL: https://issues.apache.org/jira/browse/NIFI-15305
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 2.6.0
> Reporter: Taylor Obyen
> Priority: Minor
> Attachments: image-2025-12-06-19-30-42-959.png
>
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> There is a bug with the PutDatabaseRecord processor in which epoch timestamps are parsed as millisecond timestamps when provided a number with no decimals and seconds when there is a decimal.
>
> NiFi Version: 2.6.0
> PostgreSQL Version: 18.1
> PostgreSQL Driver Version: 42.7.8
> Record Reader: JsonTreeReader (No modifications)
> Statement Type: INSERT
>
> Table schema
> {code:java}
> CREATE TABLE public.test (
> id int GENERATED BY DEFAULT AS IDENTITY,
> ts timestamptz NOT NULL
> ); {code}
>
> Input:
> {code:java}
> {
> "ts": 1765056655230
> } {code}
> Timestamp loaded into PostgreSQL: `{color:#00875a}2025-12-06 16:30:55.230 -0500{color}`
>
> Input:
> {code:java}
> {
> "ts": 1765056655230.746
> } {code}
> Timestamp loaded into PostgreSQL: `{color:#FF0000}57902-06-03 07:20:30746. -0400{color}`
>
> The information tip for the Timestamp Format field in the JsonTreeReader Controller Service indicates that timestamp fields are assumed to be the epoch in milliseconds unless a time format is specified:
> !image-2025-12-06-19-30-42-959.png|width=584,height=235!
>
> The behavior was introduced in: NIFI-12710
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)