Wednesday, 2 March 2016

Date related Talend Functions


TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",myDate)

TalendDate.parseDate("yyyy-MM-dd HH:mm:ss","")

TalendDate.getDate("CCYY-MM-DD hh:mm:ss")

TalendDate.getRandomDate("2007-01-01","2008-12-31")

TalendDate.diffDate(myDate,myDate2,"MM")

TalendDate.addDate(myDate,pattern,addValue,"MM")

TalendDate.compareDate(myDate,myDate2,"yyyy-MM-dd")

DATE 2 STRING 2 DATE Examples

----------String 2 Date Conversion Example------ 

String a="2016-01-23";

Date d=TalendDate.parseDate("yyyy-MM-dd", a);

System.out.println("\nInput String ------ "+a);

System.out.println("\nOutput Converted Date------"+d);

RESULT :


Input String ------ 2016-01-23

Output Converted Date------Sat Jan 23 00:00:00 IST 2016


----------Date 2 String Conversion Example------ 

String a1="2016-01-23";

Date d1=TalendDate.parseDate("yyyy-MM-dd", a1);

String b1=TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",d1);

System.out.println("\nInput Date ------ "+d1);

System.out.println("\nOutput Converted String------"+b1);

RESULT :

Input Date ------ Sat Jan 23 00:00:00 IST 2016


Output Converted String------2016-01-23 00:00:00

----------Date Conversion with AM/PM Example------ 

String a5="2016-01-23 12:30:45 AM";

Date d5=TalendDate.parseDate("yyyy-MM-dd HH:mm:ss aa", a5);

System.out.println("\nInput String ------ "+a5);

System.out.println("\nOutput Converted Date------"+d5);

String b7=TalendDate.formatDate("yyyy-MM-dd HH:mm:ss aa",d5);

System.out.println("\nOutput Converted String------"+b7);

RESULT :

Input String ------ 2016-01-23 12:30:45 AM

Output Converted Date------Sat Jan 23 12:30:45 IST 2016

Output Converted String------2016-01-23 12:30:45 PM

Wednesday, 24 February 2016

VLOOKUP Function

 VLOOKUP stands for “Vertical Lookup”.

It can be used anytime that you have a list of data with the key field in the left-most column.

VLOOKUP needs four parameters.

Ist Parameter :  The cell value which needs to be SEARCHED.

2nd Parameter : The RANGE  with your lookup table. Highlight the range. Be sure to use F4 to make the range be absolute. (An absolute reference has a dollar sign before both the column number and row number. When the formula is copied, the reference will continue to point towards I3:J351.

3rd Parameter : In which column the Target Value to be found.
 In the Range of Lookup Table, if the column is 3, then you got to give as  3  for this parameter.

4th Parameter :  if a “close” match is OK.   then give  True.  If it is not, enter False.

Example :  http://www.mrexcel.com/tip096.shtml


Eg:  =VLOOKUP(Z7,AC6:AD14,2,FALSE)

In the above example

Z7 -- Cell no: consists of the data needs to be searched.
AC6:AD14 --- Range of the lookup table in which the output value shall be available.
2-- As we need the second column data in the lookup table  we have given 2.
FALSE -- we don't want close match. We need Exact Match. So, False is given.











Wednesday, 20 January 2016

Input length must be multiple of 16 when decrypting with padded cipher

ERROR :

Exception in component tDecryptColumn_1
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)
at javax.crypto.Cipher.doFinal(Cipher.java:2087)
at essar_custom.create_rec_0_1.Create_REC.tFixedFlowInput_1Process(Create_REC.java:3826)
at essar_custom.create_rec_0_1.Create_REC.runJobInTOS(Create_REC.java:11972)
at essar_custom.create_rec_0_1.Create_REC.main(Create_REC.java:11718)
[statistics] disconnected
Job Create_REC ended at 17:20 20/01/2016. [exit code=1]

SOLUTION:

Pass the password in encrypted format.

Wednesday, 13 January 2016

Tcode for killing TALEND jobs that are dumping SAP data due to BAD where condition provided.

TCODE : sm37

After entering Tcode, it asks for

jobname : Give the filename into which SAP is dumping the data.
User Name :  Give the Username thru which you are logging into SAP.


  • After clicking on EXECUTE button, you will be shown the corresponding jobs.
  • Select the job i.e still in running mode.
  • Click on STOP (Red button .


YOU R DONE.



Avoiding the ERROR "This component doesn't support Dynamic Type"

Search for the below the jar file in the below path.

Path : c:\studio\plugins\
Jar file : org.talend.core.tis_5.5.1.r118616.jar

1)Go to Plugins folder of the studio where it is installed.
2)Go to archive mode of the above jar file mentioned.
3)Go to resources folder
4)Open the supportDynamic.txt file.
5)Add the custom component name at the end of the file.
6)Save it.


YOU R DONE.


Note: If it is not allowing you to SAVE, close the TALEND application and try the above process.

Please find below the screenshot of the same .




Are You Thinking?????????????????????

                      Question Yourself for few Seconds?                         Are you Thinking at all?                              When ...