Customize Field Standardization
You can use the advanced configuration interface of the StandardizeMetadata processor to customize the field standardization rules.
- To add a new rule, drag one of the options (such as Product, Field, or Move) from the column on the left, onto the editor in the relevant place. You can also drag and drop examples from the XML Samples tab into the editor.
- To edit or remove existing rules, use the editor.
- To change the order of existing rules, drag and drop elements in the editor.
- To save your changes, click SAVE. The changes are saved, for this processor only, in the folder
idol_repository/StandardizeMetadata_id/
of your NiFi installation, whereid
represents the processor ID.
Test Field Standardization Rules
You can test the rules that you have configured.
To test field standardization rules
- Click the TESTER tab.
- In the Input XML Metadata box, enter some document XML metadata.
- In the Component Names box, enter component names to choose the rules to use. For example, if you enter a component name that matches the regular expression
.*FileSystem
, the rules for the File System Connector are enabled. The value you enter should match or be included in the value of the Component name property when you configure the processor. -
(Optional) In the standardization rules you can use variables containing the document reference,
$(reference)
, or FlowFile attribute values,$(flowfile_attribute_name)
. To provide sample values for these variables when testing the standardization rules, click ATTRIBUTES.For example, the following rule references a FlowFile attribute named "myFlowFileAttribute".
You might define a sample value as follows:
-
Click TRANSFORM.
The processed XML is displayed in the Output XML Metadata box.
View Collated Metadata
NOTE: To use this feature, you must set the processor property Collate Metadata to true.
The METADATA tab displays document metadata, collated from all of the documents that the processor has encountered. The field values are from the last document processed in which the field was present. You can use this information to help construct your field standardization rules, and verify that you have standardized all of the fields that you require.
- To begin with, the UI displays metadata that was collated from input documents. To see metadata that was collated from output (transformed) documents, toggle the BEFORE STANDARDIZE option to AFTER STANDARDIZE.
- To see further information about a field, and additional example values, hover the mouse pointer over the field.
- To clear the collated metadata, click CLEAR.