Posts

Showing posts from August, 2013

Null pointer exception in tmap

You might have faced a common error in Talend i.e. the  NullPointerException in tMap "Exception in component tMap_1 java.lang.NullPointerException" Solutions: 1) Make sure your columns are nullable when you define the schema. 2) The NullPointerException indicate there are some null value on lookup table, so you need to deal with the null value on corresponding columns on expression filed of tmap, for example: !Relational.ISNULL(row13.abc)? row13.xyz:row13.sss:null

Generating Date Dimension

Create a new job called date_dim . First we will define a variable for start date, because we will use this job in various projects and we might require a different start date each time: Click on the Context tab and then on the + button to add a new context variable. Give it the name myStartDate of type Date and define a value for it. Next add a tRowGenerator component to the design area and double click on it to activate the settings dialog. The idea is to create X amount of rows: The first row will hold our start date and each subsequent row will increment the date by one day. 1.        Click the + button to add a new column. Name it date and set the type to Date . 2.        Click in the Environment variables cell on the right hand side and then you will see the parameters displayed in the Function parameters tab on the bottom left hand side. 3.        Define the number of rows that should be generated in Number of Rows for RowGenerator. 4.        In t