August 15, 2023

Configuring the process of writing data into the HBase – Docs for ESB 6.x

Configuring the process of writing data into the HBase

To do this, proceed as follows:

  1. On the Design workspace, double-click the tFixedFlowInput component to open its Component view.

    use_case-thbaseinput_inflow.png

  2. In this view, click the three-dot button next to Edit schema to open the schema editor.

    use_case-thbaseinput_inflow_schema.png

  3. Click the plus button three times to add three rows and in the Column column, rename the three rows respectively
    as: id,
    name
    and age.
  4. In the Type column, click each of these
    rows and from the drop-down list, select the data type of every row. In this
    scenario, they are Integer for id and age,
    String for name.
  5. Click OK to validate these changes and
    accept the propagation prompted by the pop-up dialog box.
  6. In the Mode area, select the Use Inline Content (delimited file) to display
    the fields for editing.
  7. In the Content field, type in the
    delimited data to be written into the HBase, separated with the semicolon
    ;“. In this example, they are:

  8. Double-click tHBaseOutput to open its
    Component view.

    Note:

    If this component does not have the same schema of the preceding
    component, a warning icon appears. In this case, click the Sync columns button to retrieve the schema
    from the preceding one and once done, the warning icon disappears.

    use_case-thbaseoutput.png

  9. Select the Use an existing connection
    check box and then select the connection you have configured earlier. In
    this example, it is tHBaseConnection_1.
  10. In the Table name field, type in the name
    of the table to be created in the HBase. In this example, it is customer.
  11. In the Action on table field, select the
    action of interest from the drop-down list. In this scenario, select
    Drop table if exists and create. This
    way, if a table named customer exists already in the HBase, it will be
    disabled and deleted before creating this current table.
  12. Click the Advanced settings tab to open
    the corresponding view.

    use_case-thbaseoutput-advanced.png

  13. In the Family parameters table, add two
    rows by clicking the plus button, rename them as family1 and family2
    respectively and then leave the other columns empty. These two column
    families will be created in the HBase using the default family performance
    options.

    Note:

    The Family parameters table is
    available only when the action you have selected in the Action on table field is to create a table in
    HBase. For further information about this Family
    parameters
    table, see tHBaseOutput.

  14. In the Families table of the Basic settings view, enter the family names in
    the Family name column, each corresponding
    to the column this family contains. In this example, the id and the age columns belong to family1 and the name
    column to family2.

    Note:

    These column families should already exist in the HBase to be
    connected to; if not, you need to define them in the Family parameters table of the Advanced settings view for creating them at
    runtime.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x