Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

caro_vm
2012-03-29 15:06:21

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=sad"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

PatriciaS
2009-08-28 04:13:06

Thank you very much. That worked. It seems weird to this non-Java person :-D

shong
2009-08-28 04:03:55

Hello
try
row3.CHECK_NUM.equals("")

Best regards

         shong

PatriciaS
2009-08-28 01:40:26

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.

Board footer

Powered by FluxBB