How to convert a hexadecimal to bigdecimal

Four Stars

How to convert a hexadecimal to bigdecimal

Hi,

My requirement is to convert a string coming from a file in the format "00714078c3" and I have to convert it to bigdecimal and then do some look up with data in the lookup tables. 

I am using tmap component. 

 

Apparently bigDecimal will not work as it is alphanumeric.

 

Can someone please help with that? 

Community Manager

Re: How to convert a hexadecimal to bigdecimal

Why don't you convert the lookup data to string value before doing the join?
----------------------------------------------------------
Talend | Data Agility for Modern Business
Employee

Re: How to convert a hexadecimal to bigdecimal

Hi,

 

   A quick method is as shown below. You can further convert the value from Integer to BigDecimal (if needed) using tConvertType component.

image.png

 

image.png

 

Integer.parseInt(row1.data,16)

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

Highlighted
Seven Stars

Re: How to convert a hexadecimal to bigdecimal

Thank you I didn't now you could parse it like that !
I'll sleep smarter tonight Smiley Happy

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

Have you checked out Talend’s 2019 Summer release yet?

Find out about Talend's 2019 Summer release

Blog

Talend Summer 2019 – What’s New?

Talend continues to revolutionize how businesses leverage speed and manage scale

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog