I’m having some problems with the datamapper. I’m using a few different csv files and they have mostly the same fields. But sometimes the files have an extra field that I need to use in the designer. Is there a way for me to tell the datamapper or the designer to ignore the field if it does not exist?
The code tries to extract the column and if it’s not present, it traps the error (through the try…catch construct) and provides a default value for the extraction, thereby preventing the error from stopping the data mapping process.
Change the name of the CSV Column (MyField) and the defaut value to store (NOT PRESENT) to fit your needs.