Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

validation of rows in .csv file

Hi,

this is aditya,i need to validate .csv file with rows.i have 3 columns but in some records i am having empty columns and in one record i am having extra column so here i need to validate rows in .csv.i need output like records matches with header remaining records should be eliminated.please find the image below.

Labels (3)
10 Replies
Anonymous
Not applicable
Author

Hi @adutta ,

 

    I believe your query is that you would like to validate the schema of your input data. Could you please try the component tSchemaComplianceCheck which will segregate the records to good and bad based on the schema defined?

 

     I believe it will solve your query.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

Anonymous
Not applicable
Author

Hi aditya, 

 

Try to use tschemacompliancecheck , it will solve your issue.

0683p000009M5ul.png

 

Thanks,

Prabuj

/Don't forget to give kudos/

Anonymous
Not applicable
Author

Hi thanks for given reply,please check my image even i am using tschemacompliance check i am getting error with one record i.e record having extra column.please check my snapshots once.thank you.please help me.


Screenshot (456).png
Screenshot (457).png
Anonymous
Not applicable
Author

Hi thanks for given reply,please check my image even i am using
tschemacompliance check i am getting eror with one record i.e record having
extra column.please check my snapshots once.thank you.please help me.
Anonymous
Not applicable
Author

@adutta  alright, here is what i found out. 

First, you are expecting 1,2,4 as invalid -  3,5 column as valid. if m right.

Second, i think it's not possible to bring 1 as a invalid, it don't have empty value or null. 

Using the length it can be trim or avoided, even then it won't result as what you looking for !

Please let me know if you bring it up and share us well !

 

0683p000009M5v5.png

 

Thanks,

Prabuj.

Anonymous
Not applicable
Author

i am getting error like this image bro,plz check.i have increase jvm parameters as well


Screenshot (458).png
rsmits
Contributor
Contributor

Are you trying to use the substring function for an integer value? That doesn't work.

Anonymous
Not applicable
Author

hi bro,sorry can you please tell me how to use substring for int

rsmits
Contributor
Contributor

Something like this: (row1.newColumn.toString()).substring(2,4)

 

 

So if row1.newColumn = 123456789 this will give you 34 as output.

 

Input is int.....output is a string value in this case, but you can cast it to an int again.