i have a problem in REFORMAT Transformation
The process is that i have to take the data from MYSQL database. need to transform it and again load it into MYSQL database.
the EXTRACTING part is done… now i have to transform…
which includes cleaning rules… which can be done by REFORMAT Transformation.
The transformation includes the replacing some field values by other like we replace gender field value male/female with 1/0…
so is there any way of doing this…??
if yes please provide me a sample code…
it is not necessary to take file can be from database… if it can be done with a text file data its fine…
please help me its urgent…
Hi All,
I am new to clover ETl. I have a xls file from which I have to read data and insert in mysql database. The excel file has datatype like number and date but mysql supports integer and datetime. How di I convert it before loading. I tried this
Hello,
if the numbers are integers in fact, try to load them with Integer data field. It should work. The same with dates; you probably even don’t need to set a format.
Hello Purvi,
what do you mean by “doesn’t work”? Does it throw an error? Or doesn’t evaluate the expression properly? Please show your graph/node.
Such expression should work in any component, that uses CTL, that means Reformat, ExtFilter, DataGenerator etc.
If you would write your aim, I could give you a better concrete advice.
My aim is to filter all the rows greater than a specified date. I tried to add in the reformat port with following expression:
$0.PurchaseDate > 1996-07-04
It threw following error:
Type mismatch: cannot convert from ‘boolean’ to ‘date’ at mapping 4, column 2
when I tried with $0.PurchaseDate > ‘1996-07-04’
It threw following error:
Incompatible types ‘date’ and ‘string’ for binary operator at mapping 4, column 20
When I tried in ExtFilter transformer it threw following error:
ERROR [WatchDog] - Node EXT_FILTER0 finished with status: ERROR caused by: Interpreter runtime exception on line 2 column 1 - compare: unsupported compare operation for null value
ERROR [WatchDog] - Node EXT_FILTER0 error details:
org.jetel.ctl.TransformLangExecutorRuntimeException: Interpreter runtime exception on line 2 column 1 - compare: unsupported compare operation for null value
Hello Purvi,
your graph is proper, but evidently a record with null (empty) PurchaseDate comes to the filter. To avoid the error, you can add checking of the null values, so your filter expression should look as follows: