Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
****************************************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
I'm happy this post helped you, can you select my answer as best answer to close the post?
Hi
(new BigDecimal(row1.lattitude)).compareTo(BigDecimal.valueOf(180)) > 0 ? new BigDecimal(0) :
row1.lattitude
Send me love and kudos
I'm happy this post helped you, can you select my answer as best answer to close the post?