Configure the tFixedFlowInput component and the
tSnowflakeOutput component to write data into
Snowflake.
Procedure
Double-click the tFixedFlowInput component to open its Basic settings view.
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.
Click OK to validate these
changes and accept the propagation prompted by the pop-up dialog box.
In the Number of rows field, enter the number of records to
be generated, 5 in this example.
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).
Double-click the tSnowflakeOutput component to open its Basic settings view.
From the Connection
Component drop-down list, select the tSnowflakeConnection component to reuse the connection created by
it.
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,
the table created by the tSnowflakeRow component. When done,
click OK to close the dialog box.
From the Output action
drop-down list, select Insert to write data to
the table EMPLOYEE.
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!