Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5399

Spaces in CSV field names result in an exception when creating a CSV connector

    Details

      Description

      I seem to have run into an issue with the CSV connector. Using the built in OrientDB for a POC.

      I am finding that if my CSV field names have spaces in, the connector fails with an exception like the following:

      java.lang.IllegalArgumentException: Invalid field name 'Employee Number'. Character ' ' is invalid
      at com.orientechnologies.orient.core.record.impl.ODocument.checkFieldName(ODocument.java:1645)
      at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:738)

      I'm no expert but I went digging in the OrientDB code. Sure enough it doesn't like ' '. You can see that in the code here:

      See https://github.com/orientechnologies/orientdb/blob/master/core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OSchemaShared.java

      It does appear, that if the field name in question is the UID or Username then it works ok with spaces. I assume because of the transformation to _UID_ before entering Orient.

      I assume some sort of transformation must have been happening in the past that is no longer occurring to cause this.

        Attachments

          Activity

            People

            • Assignee:
              jbranch Jon Branch
              Reporter:
              wayne.blacklock Wayne Blacklock
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: