[ltb-dev] [LDAP Tool Box - Bug #619] Empty column in csv results in failing ldif import

noreply at lsc-project.org noreply at lsc-project.org
Wed Sep 11 15:56:14 CEST 2013


Issue #619 has been updated by Clément OUDOT.


Seems this the same issue as #134

You should try the SVN version of the script: http://tools.ltb-project.org/projects/ltb/repository/entry/ldap-scripts/trunk/file2ldif.pl
----------------------------------------
Bug #619: Empty column in csv results in failing ldif import
http://tools.lsc-project.org/issues/619

Author: Joris Meijer
Status: New
Priority: Normal
Assigned to: 
Category: LDAP Scripts
Target version: ldap-scripts-0.4


When I use a csv file containing an empty value in one of the columns, my resulting LDIF file cannot be imported. 

*Actual CSV:*
“Employee number”;”Title”;”Initials”;“First Name";”Infix”;"Last Name";”Signup code”
000001;Dhr.;C.L.;Clement;der;Oudot;aaa
000002;Mvr.;J;Jonathan;;Clarke;bbb

*Actual output:*
dn: uid=000001,dc=myorg.nl
changetype: add
initials: C.L.
gn: Clement
uid: 000001
cn: Clement der Oudot
myInfix: der
sn: Oudot
title: Dhr.
objectClass: inetOrgPerson
objectClass: myPerson
mySignupCode: aaa

dn: uid=000002,dc=myorg.nl
changetype: add
initials: J
gn: Jonathan
uid: 000002
cn: Jonathan  Clarke
myInfix:
sn: Clarke
title: Mvr.
objectClass: inetOrgPerson
objectClass: myPerson
mySignupCode: bbb

*The errow when trying to import the ldif in ldap:*
ldap_add: Invalid syntax (21)
        additional info: myInfix: value #0 invalid per syntax

*What I would expect is that the attribute is not added at all, so expected output is:*
dn: uid=000001,dc=myorg.nl
changetype: add
initials: C.L.
gn: Clement
uid: 000001
cn: Clement der Oudot
myInfix: der
sn: Oudot
title: Dhr.
objectClass: inetOrgPerson
objectClass: myPerson
mySignupCode: aaa

dn: uid=000002,dc=myorg.nl
changetype: add
initials: J
gn: Jonathan
uid: 000002
cn: Jonathan  Clarke
sn: Clarke
title: Mvr.
objectClass: inetOrgPerson
objectClass: myPerson
mySignupCode: bbb

The schema I use is attached.



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://tools.lsc-project.org/my/account
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ltb-project.org/pipermail/ltb-dev/attachments/20130911/e9d78ac6/attachment.htm>


More information about the ltb-dev mailing list