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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Nine 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
14 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

Nine 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
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...

 

Nine Stars

Re: type mismatch cannot convert from string to bigdecimal

i could not open that link,wich you provided.

Manohar B
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.

Nine Stars

Re: type mismatch cannot convert from string to bigdecimal

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

Manohar B
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.

Nine 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
Nine Stars

Re: type mismatch cannot convert from string to bigdecimal

did your issue resolve?

Manohar B
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