Tuesday, 30 June 2015

DATA TYPE CONVERSIONS

String to Integer --- Integer.parseInt(row1.myString)

String to Date -- TalendDate.parseDate("dd-MM-yyyy",row1.myString)

String to BigDecimal -- new BigDecimal(row1.myString)

String to Float -- Float.parseFloat(row1.myString)

String to Long  -- Long.parseLong(row1.myString)

Integer to String -- variable+"" or variable.toString()

Date to String -- TalendDate.formatDate("yy-MM-dd", row1.myDate)

BigDecimal to String -- row1.myBigDecimal.toString()

Wednesday, 4 February 2015

String 2 Date Conversion

Input.First_Date.equals("null") ? null :  TalendDate.parseDateLocale("MM/dd/yyyy HH:mm:ss aa",Input.First_Date,"EN")

Wednesday, 19 November 2014

Example 4 Efficient For Loop in Talend

String Col="abcd,efg";
String[] filters = col.split(",");
String CFILTER = "WHERE ( ";

for(String filter : filters ) {
  CFILTER += " OR (\"STATUS\" LIKE '%"+filter+"%')";
}

The above split function will split the passed string into multiple rows.
for loop will be iterating till the last row.
we don't have to mention any start/end in the for loop.

Config file not picking up in TAC

This occurs mainly when the PROJECT  is RENAMED.

So,prepare a pre-requiste list of items that are needed to be added when project is renamed.

1)Any custom components needs to be added.
2)Custom components specifically used in context parameter file JOBLET/JOB used.

Summary :
--------------
-->Add and apply Custom components to the project.

Monday, 17 November 2014

Solution for ZIP file Deployment of Talend job in TAC

After configuring the normal properties that Talend Documentation says, deployment fails because of some default settings in Internet Explorer.

The solution for it is as follows.

Solution 1 :  It works well if you create a TASK in CHROME browser instead of INTERNET EXPLORER.

Note :  1 thing to remember is the TAC webpage consists of multiple pages for the TASKS. check for the last page for your task    created.


Solution 2 :  In INTERNET EXPLORER,  you got to do some settings configured as below.
                   Tools --> Internet Options --> Security --> Custom Level --> DISABLE  "Include Local Directory Path when Uploading files to Server".

tPrejob & tPostjob Components

we can perform different type of activities by using the tPrejob & tPostjob Components.

tPrejob :   This will be first component to be run in the Talend job.

                  1)  Run the Child jobs.
                  2) Drop the Database Indexes
                  3)Truncate the Database Tables.
                  4)Disable the Indexes of TABLES.

tPostjob :   This will be last component to be run in the Talend job
         
                1)Re-create the Indexes which are dropped in tPrejob
                2)Enable the Indexes which are disabled in tPrejob

Note : Pre & Post jobs will work even if the job fails.

creating a request in tXMLMAP

1) Add a column
2)Make the datatype as document
3)Import the schema which is already created by checking the checkbox in ESB component.