You are not logged in.
Announcement
Unanswered posts
|
Hello! I have a job like this:
tFileDelimitedInput---->tMap---->tMSSqlOutput
In the file I have an schema like this:
-cuenta (bigdecimal)
-nro_asiento(int)
-fecha(string)
-importe(bigdecimal)
-detalle(string)
-rubro(string)
-ejercicio(string)
cotizacion(bigdecimal)
the schema of the SQLServer is:
-id_cta
-id_tie_dia
-nro_asiento
-imp_asiento
-detalle_asiento
-imping_asiento
-impgas_asiento
-id_tie_ejercicio
-cotizacion_moneda
I have to compare rubro from the CSV file and according to the result of this, fill imping_asiento or impgas_asiento.
The comparison in java code may be:
if (rubro=
"GAN")){
imping_asiento=importe;
impgas_asiento=0;
}else{
impgas_asiento=importe;
imping_asiento=0;
}
The question is, where I have to put this code? in the tMap component?
Thank you very much
Regards
Thank you very much. That worked. It seems weird to this non-Java person :-D
Hello
try
row3.CHECK_NUM.equals("")
Best regards
shong
I have a positional file as input to tMap
I use the Java environment
I am trying to select certain records to an output file.
In the expression filter for the file, I can say
row3.CHECK_NUM.equals("123456789")
and it works
But if I try to select records with the field blank, I get no records selected, even though I have many records with that field blank.
I tried the following, and other more complicated things
row3.CHECK_NUM.equals(" ")
I looked at the file in hex, and the blank field is filled with x20
When I tried to select for non-blank fields, I got all records.