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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
TDIALLO
Contributor II
Contributor II

Comparaison avec le signe( >) sur un String

****************************************Français**********************************

Bonjour,

J'ai un cas de comparaison qui me fatigue un peu sur talend

En fait j'ai un String en entrée et en sortie j'ai un BigDecimal..

je dois ignorer toutes les valeurs supérieur à 180

j'ai essayé ceci

new BigDecimal(row1.lattitude) > BigDecimal.valueOf(180) ? new BigDecimal(0) :

row1.lattitude

et j'ai l'erreur

 L'opérateur > n'est pas défini pour le ou les types d'arguments java.math.BigDecimal, java.math.BigDecimal

j'ai essayer de convertir en integer ou en Double mais j'ai la même erreur

voici un exemple de donnée:

le but étant d'ignorer

837733 car il est > 180

|code_produit| lattitude     |longitude     |

|=-----------+-------------------+------------------=|

|55770-E   | 46.26395      | 837733     |

Merci pour votre précieuse aide

****************************************English**********************************

Hello,

I have a comparison case that bothers me a bit on talend

In fact I have a String as input and as output I have a BigDecimal..

I must ignore all values ​​greater than (>) 180

i tried this

new BigDecimal(row1.lattitude) > BigDecimal.valueOf(180) ? new BigDecimal(0): row1.lattitude

and I got the error

Operator > is not defined for argument type(s) java.math.BigDecimal, java.math.BigDecimal

I tried to convert to integer or Double but I got the same error

here is an example of data:

|code_produit| lattitude     |longitude     |

|=-----------+-------------------+------------------=|

|55770-E   | 46.26395      | 837733     |

the goal being to ignore 837733 because it is > 180

Thank you for your precious help

Labels (3)
1 Solution

Accepted Solutions
gjeremy1617088143

I'm happy this post helped you, can you select my answer as best answer to close the post?

View solution in original post

3 Replies
gjeremy1617088143

Hi

(new BigDecimal(row1.lattitude)).compareTo(BigDecimal.valueOf(180)) > 0 ? new BigDecimal(0) :

row1.lattitude

 

Send me love and kudos

 

 

TDIALLO
Contributor II
Contributor II
Author

thank you very much

gjeremy1617088143 

it does the job

have a nice day

gjeremy1617088143

I'm happy this post helped you, can you select my answer as best answer to close the post?