Hi Talend Folks,
Talend will not add extra zeros at the front, without some specific logic somewhere. Are you sure your target Excel file does not have a column format defined that is showing these extra zeros?
Unless you have specified a format in the schema definition, or somewhere in your job, or your target Excel has a format defined on the column, I don't where this will be coming from.
@RAJ,your excel file might have leading zeros format.
Using a tJavaRow you can do that:
output_row.yourField = input_row.yourField != null && input_row.yourField.length() == 14 ? input_row.yourField :
("00000000000000"+input_row.yourField).substring(("00000000000000"+input_row.yourField).length() - 14);
Here is the result:
Démarrage du job test a 10:02 31/05/2018. [statistics] connecting to socket on port 3847 [statistics] connected 00000004567567 00000004536785 00000004567890 45678905678-01 45675458765-02 [statistics] disconnected Job test terminé à 10:02 31/05/2018. [Code sortie=0]
@RAJ, I read you case too fast and thought you want to add leading zeros.
Then I try to push your sample content to an Excel file (field field defined as String) and it works fine, no leading zeros in the output file.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Read about OTTO's experiences with Big Data and Personalized Experiences
Pick up some tips and tricks with Context Variables
Take a look at this video about Talend Integration with Databricks