EvaluateJsonPath 2025.10.2.19

Bundle

org.apache.nifi | nifi-standard-nar

Description

Evaluates one or more JsonPath expressions against the content of a FlowFile. The results of those expressions are assigned to FlowFile Attributes or are written to the content of the FlowFile itself, depending on configuration of the Processor. JsonPaths are entered by adding user-defined properties; the name of the property maps to the Attribute Name into which the result will be placed (if the Destination is flowfile-attribute; otherwise, the property name is ignored). The value of the property must be a valid JsonPath expression. A Return Type of “auto-detect” will make a determination based off the configured destination. When “Destination” is set to “flowfile-attribute,” a return type of “scalar” will be used. When “Destination” is set to “flowfile-content,” a return type of “JSON” will be used. If the JsonPath evaluates to a JSON array or JSON object and the Return Type is set to “scalar” the FlowFile will be unmodified and will be routed to failure. A Return Type of JSON can return scalar values if the provided JsonPath evaluates to the specified value and will be routed as a match. If Destination is “flowfile-content” and the JsonPath does not evaluate to a defined path, the FlowFile will be routed to “unmatched” without having its contents modified. If Destination is “flowfile-attribute” and the expression matches nothing, attributes will be created with empty strings as the value unless “Path Not Found Behaviour” is set to “skip”, and the FlowFile will always be routed to “matched.”

Balises

JSON, JsonPath, évaluer

Exigences en matière d’entrées

REQUIRED

Prend en charge les propriétés dynamiques sensibles

false

Propriétés

Propriété

Description

Destination

Indique si les résultats de l’évaluation JsonPath sont écrits dans le contenu FlowFile ou dans un attribut FlowFile ; si vous utilisez un attribut, vous devez spécifier la propriété Nom de l’attribut. S’il est paramétré sur flowfile-content, un seul JsonPath peut être spécifié, et le nom de la propriété est ignoré.

Longueur maximale de la chaîne

Longueur maximale autorisée d’une valeur de chaîne lors de l’analyse du document JSON

Représentation des valeurs nulles

Indique la représentation souhaitée des expressions du chemin JSON qui aboutissent à une valeur nulle.

Comportement en cas de chemin non trouvé

Indique comment traiter les expressions de chemin JSON manquantes lorsque la destination est définie sur flowfile-attribute. L’option « warn » génère un avertissement lorsqu’une expression de chemin JSON n’est pas trouvée. Si vous sélectionnez « ignorer », les attributs de toutes les expressions de chemin JSON ne seront pas pris en compte.

Type de renvoi

Indicates the desired return type of the JSON Path expressions. Selecting “auto-detect” will set the return type to “json” for a Destination of “flowfile-content”, and “scalar” for a Destination of “flowfile-attribute”.

Relations

Nom

Description

failure

Les FlowFiles sont routés vers cette relation lorsque l’adresse JsonPath ne peut être évaluée par rapport au contenu du FlowFile ; par exemple, si le FlowFile n’est pas un JSON valide

matched

Les FlowFiles sont routés vers cette relation lorsque le JsonPath est évalué avec succès et que le FlowFile est modifié en conséquence

unmatched

Les FlowFiles sont routés vers cette relation lorsque le JsonPath ne correspond pas au contenu du FlowFile et que le paramètre Destination est fixé à flowfile-content