type mismatch cannot convert from string to bigdecimal

Five Stars

type mismatch cannot convert from string to bigdecimal

Hello,

 

Before I explain my issue, please note that I'm a beginner in Talend. 

 

The aim of my job is to use a tMsgbox component to retrieve some info from the user in order to be able to filter my extract from my Oracle database. Indeed:

step 1 : tMsgbox (for example the user has to enter this kind of thing: 2017,1,CC)

step 2 : I retrieve this string Smiley Sad(String)globalMap.get("tMsgBox_1_RESULT")) and I split my string with a home made function in order to have 3 variables: var1 = 2017, var2 =1 and var3 = CC

step 3: I use the tConvertType component in order to change from string to BigDecimal the type of var1 and var2 (var3 is already a string and it's fine) and I put a tmap linked to the tConvertType component

step 4: I use the tUnite component in order to merge the tmap from step 3) and another tmap which is a  extract from my Oracle database without any filter, it is just the same structure as my oracle database

step 5: from the TUnite component, I add a additionnal tmap in order to be able to filter with the var1, var2 and var3 created in the step 1-2-3.

 

The problem is localised in the tUnite component, its seems that I have a problem with the type of variables, or I checked everywhere and in all tmap, in my tUnit ... the types of var1 andbar2 = BigDecimal

 

This is the schema: 

 

This is the error message= type mismatch cannot convert from string to bigdecimal

 

Please if someone has an idea....

 

Thanks in advance

 


Accepted Solutions
Forteen Stars

Re: type mismatch cannot convert from string to bigdecimal

you should match the no. of columns ,data types and order of columns in before tunite of two intput flows in tmaps(i.e.,tmap_1 and tmap_2)

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

All Replies
Five Stars

Re: type mismatch cannot convert from string to bigdecimal

go to tunite component ->click on edit schema option->ensure i/p and o/p data type should be same ..so select appropriate data type.->then click ok->then click on sync..then run the job .

after following above step if error is nt resolved then go to tmap option..ensure data type is same for i/p and o/p then run job

Thanks!

Regards

Siddhesh 

Five Stars

Re: type mismatch cannot convert from string to bigdecimal

Hi siddheshB,

 

Thanks for your reply. I already checked the type of the variables in all tmap, and also in the tUnite, there are exactly the same everywhere... That is why I dont understand this error.

I put the tConverter component in order to have no issues with the types, but I still have problem ..

 

Thank you in advance

Forteen Stars

Re: type mismatch cannot convert from string to bigdecimal

Can you share your job and component shema's with screenshots?


@rouroux wrote:

Hi siddheshB,

 

Thanks for your reply. I already checked the type of the variables in all tmap, and also in the tUnite, there are exactly the same everywhere... That is why I dont understand this error.

I put the tConverter component in order to have no issues with the types, but I still have problem ..

 

Thank you in advance


 

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: type mismatch cannot convert from string to bigdecimal

Hi,

 

Yes sure: 

 

https://www.catupload.com/download/faeeac78f6ce4c1763ff2b2d65a69fcd.html

I put the screenshoot into a zip file.

Thanks in advance



Five Stars

Re: type mismatch cannot convert from string to bigdecimal

I had an error (not linked to the error describe in this topic) in the tmap5, this is the new screenshot for this one (therefore, dont take into account the tmap3.png from my zip file), the rest of screenshots are ok...

 

Forteen Stars

Re: type mismatch cannot convert from string to bigdecimal

i could not open that link,wich you provided.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: type mismatch cannot convert from string to bigdecimal

Ha? Its weird, its worked when I checked

 

This is a new link in another website: 

 

https://ufile.io/ohype

 

the filename of the zip is screenshots, if you click on 'slow download' button, it works fine 

Five Stars

Re: type mismatch cannot convert from string to bigdecimal

all_schema.PNGoracle database.PNGtconverter.PNGtfixedflowinput.PNGtmap1.PNGtmap2.PNGtmap3.PNGtmap5.PNGtunit.PNGI found a way to put directly here the screeshots.

Forteen Stars

Re: type mismatch cannot convert from string to bigdecimal

tUnite,should have same no.of columns/and order too from inputs.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: type mismatch cannot convert from string to bigdecimal

try to explicitly convert string to bigdecimal in tmap using

new BigDecimal(row1.string_column) 
Five Stars

Re: type mismatch cannot convert from string to bigdecimal

Hi,

 

@manishrnjn I already tried, same issue ...

 

@manodwhb Ok I understand, but how I should do to have in the same tmap the variables from 2 differents tmap without using tUnite component?

Thank you for your reply.

Forteen Stars

Re: type mismatch cannot convert from string to bigdecimal

you should match the no. of columns ,data types and order of columns in before tunite of two intput flows in tmaps(i.e.,tmap_1 and tmap_2)

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Forteen Stars

Re: type mismatch cannot convert from string to bigdecimal

did your issue resolve?

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Five Stars

Re: type mismatch cannot convert from string to bigdecimal

Hi Manodwhb,

 

I re checked this morning, and indeed, you are right, I did not know we should have the same schema for the two Tmap when using a Tunite component

 

Thank you very much for your answer !!! Smiley Happy

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

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now