Wednesday, April 22, 2015

How to use tFixedFlowInput component in Talend

In this post I will show you how to use tFixedFlowInput Component.
tFixedFlowInput Component is used to generate fixed record.

Firstly drag tFixedFlowInput component from palette and drop it to the design workspace.Open the component properties of  tFixedFlowInput by double click on component.
This window will appear here Number of rows specify the number of records you want to generate we want four records so we write 4 there.



Click on Edit Schema Button and define the columns.For example we want three columns Employee_Id,First_Name,Last_Name.So click on "+"and add these columns and define there type and length.

Now once the column are added we want to generate four records like this:
Employee_Id;First_Name;Last_Name
1;Samuel;Lasson
2;Lee;Ortega
3;John;Cohen
4;Umar;Park

These component provide three options to do this:
1.Use Single Table
2.Use Inline Table
3.Use Inline Content(delimited file)

First we will see Use Single Table Option how it works
Click on Use Single Table Option and write the values of column.In the same way write for all Employee .
We use 'Use Single Line' option when we want to insert only one row at a time where you can mention the column names and respective values for the columns.


Then select Use Inline Table click on "+" button add 4 rows and write the values.
We use 'Use Inline Table' option when we want insert more than one row at a time where you can mention the column names and respective values for the columns.


Atlast select Use Inline Content(delimited file) Option and write all the records you want to generate.
We use 'Use Inline Content' option where we can paste the data with proper delimiter with more than one row.


Then drag tLogRow component from palette to design workspace and connect tFixedFlowInput component to tLogRow by selecting Row > Main.


Here Run the job.
You can select any option such as Use Single Table,Use Inline Table and Use Inline Content you will get the same result.


Four rows are executed successfully and you have generated fixed records.

No comments:

Post a Comment