Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, Getting my feet wet in TOS, so thanks for any help or pointers. I have successfully connected to several DB's and I am able to define jobs that will move data between DB's as expected. I am now trying to make more use of tMap functions such as StringHandler. Within the tMap editor I have a field called "row1.objek" I want to strip leading zeros off. In the DB's this field is defined as a VARCHAR(18) and in tMap they are defined as Strings in both the input and output. Also, It is not a fixed length padding so there could be 12 leading 0's or 10. The input source is MS SQL Server and the output target is MySQL. If I remove this expression it works fine and will load 46k+ recs into MySQL quickly.
In this case I have the following expression defined for that field.
StringHandling.LEFT(row1.objek, 1).equals("0")
I have tried this exp on the input schema in tMap editor as well as the output schema. When defined at the input schema row1, the job will run but it will not trim the 0's. On the output schema going into MySQL it will fail at compile time with the following error. I am using the same JRE for everything.
At least job "MM_IMPORT" has a compile errors, please fix and export again.
Error Line: 1064
Detail Message: Type mismatch: cannot convert from boolean to String
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.
Apologies for mistaken terminology.
Regards,
Pat
row1.objek.replaceAll("^0+", "")
StringHandling.LEFT(row1.objek, 1).equals("0")
TalendString.talendTrim(row1.OBJEK,'0',0)