JSON_EXTRACT function in the QueryRecord processor may not be interpreting Src_obj__event_metadata as a JSON object. Instead, it likely sees Src_obj__event_metadata as a plain string, so it cannot directly access the "$.timestamp" field.
We may need to use EvaluateJsonPath processor first
to extract timestamp from Src_obj__event_metadata into a new attribute:
• Destination: flowfile-content
•Return Type: json
•JSON Path Expression: Use the following configuration in the Properties tab:
Property Value
timestamp $.Src_obj__event_metadata.timestamp
Once we extracted timestamp as a separate column, then we could call it directly in QueryRecord processor:
SELECT *
FROM flowfile
ORDER BY timestamp ASC