Taylor Obyen created NIFI-15305:
-----------------------------------

             Summary: 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
         Attachments: image-2025-12-06-19-30-42-959.png

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)

Reply via email to