Pierre Villard created NIFI-15856:
-------------------------------------

             Summary: JsonRecordSetWriter silently ignores Timestamp Format
                 Key: NIFI-15856
                 URL: https://issues.apache.org/jira/browse/NIFI-15856
             Project: Apache NiFi
          Issue Type: Improvement
            Reporter: Pierre Villard
            Assignee: Pierre Villard


When {{JsonTreeReader}} feeds {{JsonRecordSetWriter}} (in my case with a 
{{{}ConvertRecord{}}}), the writer's configured {{{}Timestamp Format{}}}, 
{{{}Date Format{}}}, {{{}Time Format{}}}, and {{Suppress Null Values}} 
properties are effectively ignored (the writer emits the reader's raw input 
bytes verbatim). This is an internal optimization: when the reader attaches the 
source JSON to the record, the writer detects a matching MIME type and 
short-circuits to the cached string instead of re-serializing from the typed 
values it already has.
 
The consequence is that, for example, an input timestamp 
{{2025-03-20T17:33:11.000+0000}} passes through unchanged even when the writer 
is explicitly configured with {{yyyy-MM-dd'T'HH:mm:ss.SSSX}} (which would emit 
{{...Z}} for UTC)
 

The existing optimisation is there for very specific use cases and it should be 
possible to turn it off if needed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to