Skip to main content Skip to complementary content

Configuring the components

Procedure

  1. Double-click tFixedFlowInput to open its Basic settings view.
  2. Select Use Inline Content (delimited file) in the Mode area.
  3. In the Content field, enter the data to pass to tWriteDynamicFields, for example:
    1;Andy;Doc
    2;Anderson;Dev
  4. Click the Edit schema button to open the schema editor.
  5. Click the [+] button to add three columns, namely id, name, and dept, of the Integer and String types respectively.
  6. Click OK to validate the setup and close the editor.
  7. Double-click tWriteDynamicFields to open its Basic settings view.
  8. Click the Edit schema button to open the schema editor.
  9. 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.
  10. Click OK to validate the setup and close the editor.
  11. 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.
  12. Double-click tJavaRow to open its Basic settings view.
  13. 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!