August 15, 2023

Inserting the employee data into a MySQL table using SCD – Docs for ESB 6.x

Inserting the employee data into a MySQL table using SCD

Configure the first tFixedFlowInput component and the first tMysqlSCD component to insert the employee data into a MySQL database table
using SCD (Slowly Changing Dimensions).

  1. Double-click the first tFixedFlowInput
    component to open its Basic settings view.

    mysql_scd_tfixedflowinput_basic.png

  2. Click the

    components-button_three_dot.png

    button next to Edit schema and
    in the pop-up window define the schema by adding five columns: id and age of
    Integer type, name and role of String type, and salary
    of Double type.

    mysql_scd_tfixedflowinput_schema.png

    When done, click OK to save the changes. In the
    pop-up dialog box, click Yes to propagate the
    schema to the next component.
  3. In the Mode area, select Use Inline Content (delimited file). Then in the
    Content field displayed, enter the following
    input employee data.

  4. Click the first tMysqlSCD component to
    open its Basic settings view.

    mysql_scd_tmysqlscd_basic.png

  5. Select the Use an existing connection
    check box and from the Component List drop-down
    list displayed, select the connection component you have configured.
  6. In the Table field, enter the name of
    employee_scd.
  7. Click the

    components-button_three_dot.png

    button next to SCD Editor to
    open the SCD editor. All schema columns are listed on the Unused panel.

  8. In the name field on the Surrogate keys panel, enter the name for the surrogate
    key, SK in this example.
  9. From the Unused panel, drag and
    drop

    • id to the Source keys panel to use it as the key to
      ensure the unicity of the input data,

    • name to the Type
      0 fields
      panel and no special action will be performed upon
      dimension changes of it,

    • age to the Type 1
      fields
      panel to perform Type 1 SCD on it,

    • role to the Type
      2 fields
      panel to perform Type 2 SCD on it, and

    • salary to the Type 3 fields panel to perform Type 3 SCD on it.

    mysql_scd_tmysqlscd_scdeditor.png

  10. In the Versioning panel, select the
    version check box to hold the version numbers
    for the historical and current records in the SCD table, and select also the
    active check box to add the column that will
    hold the True value for the current active record
    or the False value for the historical records in
    the SCD table.

    When done, click OK to save the changes and close
    the SCD editor.

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