Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Check if all the columns are present in the excel file or not before loading into DB using Java component ?

Hi,

I want to load an excel file into DB , before that I need to check if all the columns are present in the file or not.

Also I want which column is missing.[column names will be same every time I receive a new file].

 

Thanks

Suman

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Load your Excel file into your job using a preset schema, then test using a tMap to see if all expected columns are populated. Load the results into a tHashOutput. If any column is missing (or holding the incorrect type), either fail the job with a message (using a tDie) or simply do not progress to the next SubJob. The next SubJob will take your data added to the tHashOutput and carry on the processing using a tHashInput to read it back in.