CSV/Delimited Input: Field already exists in metadata
I am trying to import files in via the Directory List node and CSV/Delimited Input node. However, I am getting the following error when running the Input node:
"Unexpected exception while calculating output metadata: Field "Invoice Number" already exists in metadata"
On investigation I can see that the files have TWO columns, both called "Invoice Number". Is this the problem? How can I import the data now? I don't mind dropping the second instance of that column as it has no values.
I am a new user, so any help would be appreciated.
Kind regards.
-
Hi Reena,
2 columns with the same name can definitively not be imported
I had to face this situation and renamed the header with an Unix text editor. Depending of the file size, you may be able to rename it with a Windows-based tool such as notepad++
Any idea to proceed with duplicate columns names directly with Data3sixty is more than welcome
-
If the files have a consistent metadata specification - i.e. all files have the same field names and the fields are in the same order across all files then you can configure the 'Fieldnames' property with a comma-separated list of the field names to be used as the output field names. The input headers are then ignored by the node.
If the metadata is different across the files then each group of files with the same metadata specification would need to be imported separately (e.g. by placing them in different directories or naming the files so that a different pattern can be used to select the group of files in the Directory List node) - you can then, if required, concatenate the data using a Cat node that is configured to generate the union of the input fields.
Please sign in to leave a comment.
Comments
2 comments