<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Nifi 2.7.x seems to break ParquetRecordReader for timestamps in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413341#M254016</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently trying to write records containing timestamps to parquet.&lt;/P&gt;&lt;P&gt;The writing part seems to work fine, as the resulting parquet file contains the avro schema '{"name":"ts_string","type":{"type":"long","logicalType":"timestamp-millis"}}' and the parquet column type "timestamp[ms, tz=UTC]".&lt;/P&gt;&lt;P&gt;However when reading the same parquet file, I get the error message:&lt;/P&gt;&lt;PRE&gt;ERROR [Timer-Driven Process Thread-6] o.a.n.processors.standard.ConvertRecord ConvertRecord[id=c2746584-b622-3127-f4fd-c46a9243553e] Failed to process StandardFlowFileRecord[uuid=cef04323-a7c0-4965-84d6-c2b8d16c3fac,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1768470437932-1, container=default, section=1], offset=17423, length=6057],offset=0,name=73ca82fa-02af-44d1-9c23-27e0b2b6588f,size=6057]; will route to failure&lt;BR /&gt;java.lang.ClassCastException: class java.time.Instant cannot be cast to class java.lang.Long (java.time.Instant and java.lang.Long are in module java.base of loader 'bootstrap')&lt;BR /&gt;at org.apache.nifi.avro.AvroTypeUtil.normalizeValue(AvroTypeUtil.java:1175)&lt;BR /&gt;at org.apache.nifi.avro.AvroTypeUtil.convertAvroRecordToMap(AvroTypeUtil.java:979)&lt;BR /&gt;at org.apache.nifi.avro.AvroTypeUtil.convertAvroRecordToMap(AvroTypeUtil.java:943)&lt;BR /&gt;at org.apache.nifi.parquet.record.ParquetRecordReader.nextRecord(ParquetRecordReader.java:111)&lt;BR /&gt;at org.apache.nifi.serialization.RecordReader.nextRecord(RecordReader.java:50)&lt;BR /&gt;at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)&lt;BR /&gt;at java.base/java.lang.reflect.Method.invoke(Method.java:580)&lt;BR /&gt;at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:251)&lt;BR /&gt;at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler$ProxiedReturnObjectInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:237)&lt;BR /&gt;at jdk.proxy41/jdk.proxy41.$Proxy214.nextRecord(Unknown Source)&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractRecordProcessor.lambda$onTrigger$0(AbstractRecordProcessor.java:132)&lt;BR /&gt;at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:3410)&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:125)&lt;BR /&gt;at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)&lt;BR /&gt;at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1274)&lt;BR /&gt;at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:229)&lt;BR /&gt;at org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)&lt;BR /&gt;at org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105)&lt;BR /&gt;at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)&lt;BR /&gt;at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)&lt;BR /&gt;at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)&lt;BR /&gt;at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)&lt;BR /&gt;at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)&lt;BR /&gt;at java.base/java.lang.Thread.run(Thread.java:1583)&lt;/PRE&gt;&lt;P&gt;Trying the same thing in Nifi 2.6.0 works as expected.&lt;/P&gt;&lt;P&gt;Here is a basic flow to recreate the problem:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;GenerateRecord&lt;UL&gt;&lt;LI&gt;Record Writer: ParquetRecordSetWriter&lt;/LI&gt;&lt;LI&gt;test (dynamic property): Adress - Full Address&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;QueryRecord&lt;UL&gt;&lt;LI&gt;Record Reader: ParquetReader&lt;/LI&gt;&lt;LI&gt;Record Writer: PaquetRecordSetWriter&lt;/LI&gt;&lt;LI&gt;test (dynamic property): "SELECT *, cast(${now():toNumber()} as timestamp) AS ts FROM FLOWFILE"&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;ConvertRecord&lt;UL&gt;&lt;LI&gt;Record Reader: ParquetReader&lt;/LI&gt;&lt;LI&gt;Record Writer: AvroRecordSetWriter&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The error is thrown in the ConvertRecord Processor. Interestingly. when trying to display the flowfile in the new parquet content viewer, it also seems to crash/doesn't show anything.&lt;/P&gt;&lt;P&gt;On a side note: Are there any (better) recommendations on converting fields in records to their appropriate datatypes? I've tried using UpdateRecord with the "toDate" function. However, when using&amp;nbsp;&lt;SPAN&gt;Schema Access Strategy "Inherit Record Schema", the resulting avro type is '["string","null"]'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jan 2026 13:36:06 GMT</pubDate>
    <dc:creator>nicktk</dc:creator>
    <dc:date>2026-01-16T13:36:06Z</dc:date>
    <item>
      <title>Nifi 2.7.x seems to break ParquetRecordReader for timestamps</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413341#M254016</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently trying to write records containing timestamps to parquet.&lt;/P&gt;&lt;P&gt;The writing part seems to work fine, as the resulting parquet file contains the avro schema '{"name":"ts_string","type":{"type":"long","logicalType":"timestamp-millis"}}' and the parquet column type "timestamp[ms, tz=UTC]".&lt;/P&gt;&lt;P&gt;However when reading the same parquet file, I get the error message:&lt;/P&gt;&lt;PRE&gt;ERROR [Timer-Driven Process Thread-6] o.a.n.processors.standard.ConvertRecord ConvertRecord[id=c2746584-b622-3127-f4fd-c46a9243553e] Failed to process StandardFlowFileRecord[uuid=cef04323-a7c0-4965-84d6-c2b8d16c3fac,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1768470437932-1, container=default, section=1], offset=17423, length=6057],offset=0,name=73ca82fa-02af-44d1-9c23-27e0b2b6588f,size=6057]; will route to failure&lt;BR /&gt;java.lang.ClassCastException: class java.time.Instant cannot be cast to class java.lang.Long (java.time.Instant and java.lang.Long are in module java.base of loader 'bootstrap')&lt;BR /&gt;at org.apache.nifi.avro.AvroTypeUtil.normalizeValue(AvroTypeUtil.java:1175)&lt;BR /&gt;at org.apache.nifi.avro.AvroTypeUtil.convertAvroRecordToMap(AvroTypeUtil.java:979)&lt;BR /&gt;at org.apache.nifi.avro.AvroTypeUtil.convertAvroRecordToMap(AvroTypeUtil.java:943)&lt;BR /&gt;at org.apache.nifi.parquet.record.ParquetRecordReader.nextRecord(ParquetRecordReader.java:111)&lt;BR /&gt;at org.apache.nifi.serialization.RecordReader.nextRecord(RecordReader.java:50)&lt;BR /&gt;at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)&lt;BR /&gt;at java.base/java.lang.reflect.Method.invoke(Method.java:580)&lt;BR /&gt;at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:251)&lt;BR /&gt;at org.apache.nifi.controller.service.StandardControllerServiceInvocationHandler$ProxiedReturnObjectInvocationHandler.invoke(StandardControllerServiceInvocationHandler.java:237)&lt;BR /&gt;at jdk.proxy41/jdk.proxy41.$Proxy214.nextRecord(Unknown Source)&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractRecordProcessor.lambda$onTrigger$0(AbstractRecordProcessor.java:132)&lt;BR /&gt;at org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:3410)&lt;BR /&gt;at org.apache.nifi.processors.standard.AbstractRecordProcessor.onTrigger(AbstractRecordProcessor.java:125)&lt;BR /&gt;at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)&lt;BR /&gt;at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1274)&lt;BR /&gt;at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:229)&lt;BR /&gt;at org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)&lt;BR /&gt;at org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105)&lt;BR /&gt;at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)&lt;BR /&gt;at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)&lt;BR /&gt;at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)&lt;BR /&gt;at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)&lt;BR /&gt;at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)&lt;BR /&gt;at java.base/java.lang.Thread.run(Thread.java:1583)&lt;/PRE&gt;&lt;P&gt;Trying the same thing in Nifi 2.6.0 works as expected.&lt;/P&gt;&lt;P&gt;Here is a basic flow to recreate the problem:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;GenerateRecord&lt;UL&gt;&lt;LI&gt;Record Writer: ParquetRecordSetWriter&lt;/LI&gt;&lt;LI&gt;test (dynamic property): Adress - Full Address&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;QueryRecord&lt;UL&gt;&lt;LI&gt;Record Reader: ParquetReader&lt;/LI&gt;&lt;LI&gt;Record Writer: PaquetRecordSetWriter&lt;/LI&gt;&lt;LI&gt;test (dynamic property): "SELECT *, cast(${now():toNumber()} as timestamp) AS ts FROM FLOWFILE"&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;ConvertRecord&lt;UL&gt;&lt;LI&gt;Record Reader: ParquetReader&lt;/LI&gt;&lt;LI&gt;Record Writer: AvroRecordSetWriter&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The error is thrown in the ConvertRecord Processor. Interestingly. when trying to display the flowfile in the new parquet content viewer, it also seems to crash/doesn't show anything.&lt;/P&gt;&lt;P&gt;On a side note: Are there any (better) recommendations on converting fields in records to their appropriate datatypes? I've tried using UpdateRecord with the "toDate" function. However, when using&amp;nbsp;&lt;SPAN&gt;Schema Access Strategy "Inherit Record Schema", the resulting avro type is '["string","null"]'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2026 13:36:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413341#M254016</guid>
      <dc:creator>nicktk</dc:creator>
      <dc:date>2026-01-16T13:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi 2.7.x seems to break ParquetRecordReader for timestamps</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413342#M254017</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/141672"&gt;@nicktk&lt;/a&gt;&amp;nbsp;Welcome to the Cloudera Community!&lt;BR /&gt;&lt;BR /&gt;To help you get the best possible solution, I have tagged our NiFi experts&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/38301"&gt;@mburgess&lt;/a&gt;&amp;nbsp;&amp;nbsp;who may be able to assist you further.&lt;BR /&gt;&lt;BR /&gt;Please keep us updated on your post, and we hope you find a satisfactory solution to your query.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jan 2026 20:28:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413342#M254017</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2026-01-16T20:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi 2.7.x seems to break ParquetRecordReader for timestamps</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413500#M254093</link>
      <description>&lt;P&gt;I noticed the same. Whenever trying to read a parquet file with timestamps in v2.7, it fails with that error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've created a ticket on the nifi project:&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/NIFI-15548" target="_blank" rel="noopener"&gt;https://issues.apache.org/jira/browse/NIFI-15548&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2026 12:27:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413500#M254093</guid>
      <dc:creator>svenvk</dc:creator>
      <dc:date>2026-02-04T12:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi 2.7.x seems to break ParquetRecordReader for timestamps</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413597#M254152</link>
      <description>&lt;P&gt;Thanks to the issue created by&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/143776"&gt;@svenvk&lt;/a&gt;&amp;nbsp;this was at least partially addressed in NiFi 2.8.0. The problem was that newer Avro/Parquet libraries are using Java 8 Datatypes instead of Long/Integer to represent timestamps.&lt;/P&gt;&lt;P&gt;I say partially, because the fix only implements the Avro types:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;time-millis&lt;/LI&gt;&lt;LI&gt;time-micros&lt;/LI&gt;&lt;LI&gt;timestamp-millis&lt;/LI&gt;&lt;LI&gt;timestamp-micros&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Missing is the type for nanosecond precision "timestamp-nanos" as well as the three "local-timestamp-{millis,micros,nanos}" types.&lt;/P&gt;&lt;P&gt;See&amp;nbsp;&lt;A href="https://avro.apache.org/docs/1.12.0/specification/#timestamps" target="_blank"&gt;https://avro.apache.org/docs/1.12.0/specification/#timestamps&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, the new parquet viewer when displaying a flow file seems to suffer from the same problem that created the error described here.&lt;/P&gt;&lt;P&gt;I will create new issues in the NiFi Jira &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 15:35:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-2-7-x-seems-to-break-ParquetRecordReader-for-timestamps/m-p/413597#M254152</guid>
      <dc:creator>nicktk</dc:creator>
      <dc:date>2026-02-24T15:35:31Z</dc:date>
    </item>
  </channel>
</rss>

