Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Convert to String in csv tconvert problem

Hello everybody,
I tried to connect an csv with out Salesforce System
But i have a problem with the conversion from String to Double 
Here is my test environment:
0683p000009MGtm.png
I tried the tconvert method which has Sabrina described with the treplace component  from this thread.
I tried several scenarios to set the treplace behind or in front of tmap .. but nothing will fit properly.
It comes the following errror:
Error in the component's properties:Type mismatch: cannot convert from String to Double
But I'm not sure if this working in any way with these approach.

Here is my csv File:
0683p000009MGtr.png
Best regards john 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello Everybody 
I have solved the conversion Problem .. there is no more error if i start the job.
I have still tconvert in action cause my java skills are so bad 
...thanks for the hints 
but i think that treplace doesn't work properly.
Here are my treplace settings:
0683p000009MGtw.png
I thought i need sth. like simple expression like r/n but this  doesn't seems to work 

Here is an outline from the csv export from toad ( i've made 2 examples what is important for the transformation):

0683p000009MGu1.png

And this is the outline from the same File what i get from Talend back:

0683p000009MGu6.png


I hope that is understandable what the problem is .... 

Edit: 

Here are my Excel Sheet Settings:
 
0683p000009MGmN.png

regards john 

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Did you try in the tMap  Double.parseDouble(rowXX.yourString) (without any tReplace or tConvert)
a_vlad
Contributor
Contributor

Hello!

The answer already  in the error description
Just go from left to right on You Job and check all schemas for data type, possible to start from tMap
when You found change type String to double - use in tMap conversion function  Double.valueOf(row1.some_name)
Anonymous
Not applicable
Author

Hello Everybody 
I have solved the conversion Problem .. there is no more error if i start the job.
I have still tconvert in action cause my java skills are so bad 
...thanks for the hints 
but i think that treplace doesn't work properly.
Here are my treplace settings:
0683p000009MGtw.png
I thought i need sth. like simple expression like r/n but this  doesn't seems to work 

Here is an outline from the csv export from toad ( i've made 2 examples what is important for the transformation):

0683p000009MGu1.png

And this is the outline from the same File what i get from Talend back:

0683p000009MGu6.png


I hope that is understandable what the problem is .... 

Edit: 

Here are my Excel Sheet Settings:
 
0683p000009MGmN.png

regards john 
Anonymous
Not applicable
Author

Hello Everbody,
I've made some Tests with and without some Components and it's seems to that the TConvert Component is repsonsible for the cold cut of important data even if i deactivate  all options for the Component.
So i think with the tconvert component is getting more worse than better ...
So as https://community.talend.com/t5/Design-and-Development/Covert-integer-DateKey-to-Date-MM-dd-yyyy/td-...[size=2][font=Verdana, Helvetica, Arial, sans-serif]  [/font][/size]said before maybe it's a better idea to use tmap only.
 I'm totally new so how i have to integrate this. But i think i need treplace to trim my csv.
Do i have to do itin this way as mentioned here on the picture?:
0683p000009MGuG.png
best regards john 
Anonymous
Not applicable
Author

Update
I'm sick with the csv conversitions...
I got the Permission to Access  Directly to database and  everything is fine 
Thanks all  for helping in other threads 
regards john