Hi, I need to know if the csv file which is being processed has header names same as per expected.If the header names are different i need to reject the file.If the header names are same as per schema then the file is supposed to be processed. Please advise how this can be done?
read a first row of the file using tFileInputFullRow component then check first row of the file with tJavaRow using string compare methods like "contains, equals, equals ignore case" and based on compared result you can process file or reject it.
But how to check if the field names are as per expected tFileInputDelimited schema?Or are we supposed to check with hardcoded names?Also how to check only header names matches?And also if valid i want to process the file as tFileInputDelimited
if you have extra column at the end of header row then tSchemaComplianceCheckwill not reject your file as schema change, even it is work to reject rows not entire file.
Hi umeshrakhe, Thanks i was able to handle my conditions with your previous solution. And yes tSchemaComplianceCheck does not work with extrat columns.Also it was not validating field names. Thanks a lot, anaya
hi all,
for extra column, you can use a referentiel schema to check against it.
I use to work with referenced against built-in to work with the up-to-date schema in my job.
regards
laurent
hi all, have a lookt at "tSchemaComplianceCheck" that is designed for that goal. regards laurent
Hey Kzone, As I know, tSchemaComplianceCheck can only used for below- 1. for max length 2. for date patterns and can not used for column name validation.