How to Format Leading Zeros for Numeric.sequence ?

Four Stars

How to Format Leading Zeros for Numeric.sequence ?

I need to output Numeric.sequence with a specified number of digits. If the numeric value is less than the number of digits, I need leading zeros to be inserted... If I need 5 digits,
Ex: "12" = "00012"
Ex: "12392" = "12392"
Ex: "9" = "00009"
Any easy way to do this in a tMap?
One Star

Re: How to Format Leading Zeros for Numeric.sequence ?

Hi,
Try having a Var expresssion with 'String.format("%05d", yourinputfield); '

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads