TJoin and TMap and BigDecimal with a precision specified
Dear Forum and Talend,
I was wondering if anyone had ever come across a problem with using TJoin or TMap to join result sets where one of the join columns is a BigDecimal with a precision specified (e.g. in Oracle tha columns is defined as number(14,4) )
Both TJoin and TMap seem to not match on this type of column .. i.e. some of the rows which do actually match come through the non matching result set ...
???
Has anyone else seen this or encountered this? or have a solution to this?
thanks, Allan.
With further testing ... with a small example I could get this work (comparing number(14,4) .. where the source and destination table definitions were exactly the same.
When the table definitions differed was when I ran into problems. (wondered if items were lined up by column number within table or by columns name .. )
I'm pretty new at this ... maybe it's just me ...
Hi Shong,
Thankyou for your reply.
I tried map with string data type but get compile time error as per:
"Type mismatch: cannot convert from BigDecimal to String"
I wanted to use a Talend Process to
1./ compare source and destination query results by key columns to identify required inserts and updates
2./ where the record keys match I wanted to check all attributes to see if I could skip the update where all attributes match ..
i.e. only perform the inserts and updates that are required.
I'll see if I can post an image of the process.
best regarsds, Allan.
Maybe a related question is: A TOracleInput component has properties for both a Table Name and for a Query .. It seems that you can just provide the query and leave the table name empty?
Seem to have hit this problem:
Starting job Copy_of_Transfer_dbMap_SPD_MTH_PROD_to_PPDM at 15:20 15/06/2009.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Type mismatch: cannot convert from BigDecimal to long
Type mismatch: cannot convert from BigDecimal to Double
Type mismatch: cannot convert from BigDecimal to Double
Type mismatch: cannot convert from BigDecimal to Double
Type mismatch: cannot convert from BigDecimal to Double
at talenddemosjava.copy_of_transfer_dbmap_spd_mth_prod_to_ppdm_0_1.Copy_of_Transfer_dbMap_SPD_MTH_PROD_to_PPDM.tOracleInput_3Process(Copy_of_Transfer_dbMap_SPD_MTH_PROD_to_PPDM.java:13673)
I cut this down to a simpler process ... found that if I specified Oracle 9 I got further ...
Source database is
Oracle8i Enterprise Edition Release 8.1.7.2.0
It seems that you can just provide the query and leave the table name empty?
After you define the shema and type in the table name in Table Name field, then click on the 'Guess query' button to generate query statament automatically.
When you use tOracleInput compopnent, set Type as BigDecimal
When you use tOracleOutput component, set the Type as BigDecimal and DB Type as DEC.
Best regards
shong