August 15, 2023

Writing data into Snowflake – Docs for ESB 6.x

Writing data into Snowflake

Configure the tFixedFlowInput component and the
tSnowflakeOutput component to write data into
Snowflake.

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

    use_case-snowflake-sample_data.png

  2. Click the […] button next
    to Edit schema and in the pop-up schema dialog
    box, define the schema by adding four columns, ID of int type,
    NAME and SALARY of String type, and
    ONBOARD of Date type.

    use_case-snowflake-sample_data_schema.png

  3. Click OK to validate these
    changes and accept the propagation prompted by the pop-up dialog box.
  4. In the Number of rows field, enter the number of records to
    be generated, 5 in this example.
  5. In the Mode area, select
    Use Single Table and specify the value for each
    column.

    • ID: the automatically incremented number generated by
      the routine Numeric.sequence("id",1,1).

    • NAME: the random first name generated by the routine
      TalendDataGenerator.getFirstName().

    • ONBOARD: the random date generated by the routine
      TalendDate.getRandomDate("2007-09-01","2017-09-01").

    • SALARY: the semi-structured JSON data with the format
      {"Salary": value}, where the salary value is
      generated by the routine
      Numeric.random(100000,200000).

  6. Double-click the tSnowflakeOutput component to open its Basic settings view.
  7. From the Connection
    Component
    drop-down list, select the tSnowflakeConnection component to reuse the connection created by
    it.
  8. Click the […] button next
    to the Table field and in the pop-up dialog
    box, select the Use custom object check box and enter the name
    of the table into which the data will be written in the Object
    Name
    field. In this example, it is EMPLOYEE.
    When done, click OK to close the dialog box.
  9. From the Output action
    drop-down list, select Insert to write data to
    the table EMPLOYEE.

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