One Star

TschemaComplianceCheck: precision Non-matches Result

Hi,
Currently I'm trying to verify the Length of the fields I'm extracting from the DB generating an excel report and an additional report with the data not complying the length specified, so basically the structure of my job is pretty simple:
tOracleInput--> tSchemaComplianceCheck-->tMap---->tfileOutputExcel
from the tSchemaComplianceCheck I got:
tSchemaComplianceCheck-->tFlowMeter-->TfileOutputExcel 
The problem shows up whenever, on the DB side, I have a table with any NUMBER data-type field so the tSchema is rejecting all the data  and within the rejected's report shows "FIELD_NAME: precision Non-matches".
I'm not specifying any restriction on the length of the Bigdecimal type (the numeric field on the db side) talend is using for the number data-type and definitely I'm not changing the data type from Bigdecimal to String or something
is there something I'm missing or do I have to make some adjustments?
2 REPLIES
Four Stars

Re: TschemaComplianceCheck: precision Non-matches Result

Hi HR,
Have you created metadata for your input table and the same metadata is used for compliance check? tSchemaComplianceCheck component will verify data against the schema defined... if your data is different than the schema definition, it will reject else will not. Please verify correctness of of your schema against the database.
Thanks
Vaibhav
One Star

Re: TschemaComplianceCheck: precision Non-matches Result

Hi sanvaibhav,
Thanks for the reply,
I created the metadata from the very moment I extracted the data from the xml, this process is basically  loading the XML, using the tXMLFile for the set of the loop elements I need to xtract from the file, using a tJavaRow for some conversions, in this case for the field I'm having issues with, by default(I guess) all the elements (date, strings, numbers) are read as String from the XMLs so for this I'm using
output_row.FIELD_ = Relational.ISNULL(input_row.FIELD_)?null:new BigDecimal(input_row.FIELD) within the tJava so that way the DB to catch the element as a number.
Now, Once all the data is on the DB side, I'm extracting the data with this new job to generate some reports that must follow some rules, Length in the case, so Im using the same Schemas I used from very beginning, the only diff is that for some fields (the varchar data type only) I changed the output length within the tSchemaComplianceCheck, I haven't change at all the bigdecimal/number elements, not even touched them...
for xample:
tOraceInput                                                          |----------->|                                           tSchemaComplianceCheck
--------------------------------------------------------------------------------------------------------------------------
|Column    | DbColumn  | Key |     Type    |...|Length|----------->|Column   |   DbColumn  | Key |     Type     |...| Length |
--------------------------------------------------------------------------------------------------------------------------
|FIELD_    | FIELD_        |       | BigDecimal |...|        |------------>|FIELD_    | FIELD_        |       | BigDecimal |...|            |
--------------------------------------------------------------------------------------------------------------------------
|FIELD2_   | FIELD2_     |       |    String     |...| 350  |------------>|FIELD2_   | FIELD2_      |       |    String     |...|   100    |

Best regards