Configuring the components
Procedure
-
Double-click tFixedFlowInput to open its Basic settings view.
- Select Use Inline Content (delimited file) in the Mode area.
-
In the Content field,
enter the data to pass to tWriteDynamicFields, for
example:
1;Andy;Doc 2;Anderson;Dev
-
Click the Edit schema
button to open the schema editor.
- Click the [+] button to add three columns, namely id, name, and dept, of the Integer and String types respectively.
- Click OK to validate the setup and close the editor.
-
Double-click tWriteDynamicFields to open its
Basic settings
view.
-
Click the Edit schema
button to open the schema editor.
-
Click the [+] button
in the right panel to add two columns, namely
id and
dynamic, of the
Integer and Dynamic types respectively.
The column id contains the value of the column id from tFixedFlowInput and the column dynamic contains the values of the columns name and dept from tFixedFlowInput.
- Click OK to validate the setup and close the editor.
-
Double-click tLogRow
to open its Basic
settings view.
Select Table (print values in cells of a table) for a better display of the results.
-
Double-click tJavaRow
to open its Basic
settings view.
-
In the Code field,
enter the Java code to extract the contents of the
dynamic column dynamic:
Dynamic columns = row3.dynamic; for (int i = 0; i < columns.getColumnCount(); i++) { DynamicMetadata columnMetadata = columns.getColumnMetadata(i); System.out.println(columnMetadata.getName() + ": " + columns.getColumnValue(i) + "; " + columnMetadata.getType()); }
The dynamic column dynamic of the flow row3 is specified for retrieving the names, values and types of columns that it contains.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!