Text panel

The text panel allows you to edit and display various structured types of text. There are various views that can differ depending on the structure of the text. The general text editor can display all possible texts and even binary data in the classic way.

To open the text panel, click on the magnification icon pointed to by the arrow. The editor can then be opened by selecting the outlined cogwheel icon

text panel

The Text Panel can be opened in all Processors as long as the field type is suitable. Every field that has the magnification symbol supports the Text Panel function.

Text Editor

Navigation

text panel navigation
  1. Show/hide formatting characters

Burger menu

Clicking on the burger menu offers further options, such as uploading a file. It is also possible to save the data that has been stored in the text editor. If you have more questions about the Text Panel during editing, you will be redirected to this documentation page when you click on the Advanced features element.

textpanel burgermenu

Select text structure

The Text panel is able to automatically set color markup depending on the script type.

textpanel texteditor

Code completion

When using multi-line text editors in IGUASU, you can use the "Ctrl + Spacebar" key combination to get code completion suggestions. For single-line text fields that can be expanded, using the keyboard shortcut automatically switches to the multi-line text editor before the suggestions are displayed.

The suggestions that are displayed depend on the active language of the text editor. To change the active language, make sure the "Settings Panel" is maximized and then select a supported language from the dropdown menu.

NiFi Expression Language support

In most cases, the active default language of text editors is "text", which allows the use of the Nifi Expression Language (NiFi EL).

NiFi EL expressions must be written within a "${}", i.e. the cursor must be in a valid position for code completion suggestions to work Code completion suggestions are displayed.

Only text editors for properties that support NiFi EL will suggest NiFi EL expressions and have a $ button.

The Processors TransformXML and JSONataTransformJSON support NiFi EL, but require the expressions to be wrapped. Read the Processors' documentation to learn how.

When writing a NiFi EL expression, the text editor suggests the use of subjectless functions, function concatenations, subject functions, environment variables and attributes based on the context determined by the NiFi EL syntax rules and the data currently loaded in IGUASU. You can also see a preview of the expression evaluation in the evaluation field below. The context required for each type of suggestion is explained below.

It is possible to nest NiFi EL expressions, e.g. to use attributes as arguments for a function.

Subjectless function

Subjectless functions may not be preceded by text within a NiFi EL expression.

Function concatenation

Within a NiFi expression, prefixed text sections (including functions) are interpreted as potential subjects from which subject functions can be concatenated. Accordingly, the text editor offers a "Chain Function" suggestion that inserts a ":" (marks the end of a subject and the beginning of a subject function), and then suggests the use of a subject function.

Subject function

Subject functions must be introduced with a subject followed by a ":".

Environment variables

The environment variables that contain relevant directory paths for IGUASU: "IGUASU_DRIVER_PATH", "IGUASU_KEYSTORES_PATH", "IGUASU_PERSISTENCE_PATH" and "IGUASU_PATH", are also suggested. They can only be used for themselves or as a subject. An explanation of the various environment variables can be found here.

Attributes

Attributes that are present in the data panel (either loaded from a provenance event or added manually in the data panel) are suggested. They can only be used for themselves or as a subject.

Only properties with the appropriate "Expression Language Scope" can evaluate attributes. The scope of a property can be recognized by the icon shown on the far right of the evaluation field.
Text editors for properties without the appropriate scope will also not suggest attributes from the data panel.

Keyboard shortcuts

Action PC Mac

Code completion

Ctrl-Space

Ctrl-Space

Select all

Ctrl-A

Cmd-A

Find

Ctrl-F

Cmd-F

Replace

Ctrl-H

Cmd-Alt-F

Remove line

Ctrl-D

Cmd-D

Undo

Ctrl-Z

Cmd-Z

Redo

Ctrl-Y

Cmd-Y

Hierarchical structures (XML, JSON)

If the content in the panel is in XML or JSON, there is also the option of using a tree view in addition to the text view.

There are then menus on the elements of the tree that can be used to add, delete or edit elements. In the menus, you can also see the shortcuts that can be used to access the actions directly.

textpanel xml baum

Individual elements or even entire subtrees can be moved using drag-and-drop.

xml drag and drop

Navigation

  1. All actions can be undone via an integrated "Undo/Redo".

  2. In the search area, you can search for texts and display an XPath search field. Entries found are then highlighted in blue.

  3. A further field can be displayed that shows the path (in XPath/JSONata) of the currently selected field or error messages for operations.

  4. Starts the search from the selected XML node.

textpanel xml uebersicht

If you create your file in the text editor and need a clearer view, you can use the "Pretty Print" button to restructure the layout of your file.

textpanel xml 3

JSON view

In the case of the JSON view, a JSONata field is used in the search instead of an XPath.

textpannel jsonata