ComposantsComponents › Fichier › LectureFile › Input
Lit un fichier LDIF, le format texte des annuaires LDAP, entrée par entrée : chaque entrée donne une ligne du flux, le DN dans la colonne dn, chaque attribut dans la colonne du même nom. Le fichier peut décrire des entrées (un export d'annuaire) ou des changements : ajout, modification, suppression, renommage. Le composant ne se connecte à aucun annuaire : il lit le fichier, par exemple pour contrôler ou transformer un export avant de le charger ailleurs.
Reads an LDIF file, the text format of LDAP directories, entry by entry: each entry gives one row of the flow, the DN in the dn column, each attribute in the column of the same name. The file can describe entries (a directory export) or changes: add, modify, delete, rename. The component connects to no directory: it reads the file, for example to check or transform an export before loading it elsewhere.
EntréeInput
Aucune : il commence son sous-job. Sinon un lien Iterate : il lit un fichier à chaque itération.None: it starts its subjob. Otherwise one Iterate link: it reads one file at each iteration.
SortieOutput
Main une ligne par entréeone row per entry Reject les lignes dont une valeur n'a pas pu être convertie (sans Arrêter en cas d'erreur)the rows with a value that could not be converted (without Die on error)
Déclencheurs en sortieOutput triggers
On Subjob Ok On Subjob Error On Component Ok On Component Error Run if
Chaque entrée du fichier devient une ligne : par exemple pour passer un export d'annuaire en CSV avec un tFileOutputDelimited, ou pour le contrôler avec un tLogRow. Le schéma dit quels attributs lire : nommez ses colonnes comme les attributs LDAP (cn, mail…), plus une colonne dn.
Each entry of the file becomes a row: for example to turn a directory export into CSV with a tFileOutputDelimited, or to check it with a tLogRow. The schema tells which attributes to read: name its columns like the LDAP attributes (cn, mail…), plus a dn column.
dn (casse ignorée, à n'importe quelle place) reçoit le DN ; une colonne changetype reçoit add, modify, delete ou modrdn.The column named dn (case ignored, at any position) receives the DN; a changetype column receives add, modify, delete or modrdn.;binary). Un attribut absent de l'entrée donne null ; un attribut absent du schéma est ignoré.Any other column receives the attribute of the same name (case ignored, with or without ;binary). An attribute missing from the entry gives null; an attribute missing from the schema is ignored.#), la ligne version: et les lignes repliées sont gérés par le lecteur LDIF.Several values are joined with the Value Separator. Comments (#), the version: line and folded lines are handled by the LDIF reader.dn, puis une colonne par attribut à lire, nommée comme lui. Pour un fichier de changements, ajoutez changetype, et pour les renommages newrdn, deleteoldrdn, newsuperior.
Edit the schema: a dn column, then one column per attribute to read, named like it. For a change file, add changetype, and for renames newrdn, deleteoldrdn, newsuperior.
"UTF-8".
If values hold accents: in the Advanced settings tab, check Use field options, check Base64 for these columns and set the Encoding to "UTF-8".
Les libellés sont ceux de l'onglet Composant ; le nom technique, en gris, est celui du paramètre dans le fichier du job. Labels are those of the Component tab; the technical name, in grey, is the parameter name in the job file.
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| Type de propriétéProperty TypePROPERTY | Built-inBuilt-In | ToujoursAlways | Built-in : les réglages sont saisis dans le composant. Référentiel : le nom du fichier et le schéma viennent d'une métadonnée de fichier LDIF du Référentiel ; les autres réglages restent à saisir. Built-In: the settings are typed in the component. Repository: the file name and the schema come from an LDIF file metadata of the Repository; the other settings are still typed in. |
| Nom de fichierFile NameFILENAME | chemin par défaut + /in.ldifdefault path + /in.ldif |
ToujoursAlways | Le fichier lu, en expression Java. Il est toujours lu en UTF-8, l'encodage du format LDIF (voir Encodage). Un fichier absent arrête le job, même sans Arrêter en cas d'erreur (voir les erreurs). The read file, as a Java expression. It is always read as UTF-8, the encoding of the LDIF format (see Encoding). A missing file stops the job, even without Die on error (see the errors). |
| Ajouter l'opération en préfixe lorsque le type d'entrée est modifié.add operation as prefix when the entry is modify typeADDPREFIX | NonNo | ToujoursAlways |
Pour une entrée changetype: modify seulement : la valeur d'un attribut modifié commence par son opération, add:, replace: ou delete:. Un delete: sans valeur donne delete. Sans la case, rien ne distingue un ajout d'une suppression (voir l'exemple).
For a changetype: modify entry only: the value of a modified attribute starts with its operation, add:, replace: or delete:. A delete: without value gives delete. Without the box, nothing tells an addition from a deletion (see the example).
|
| Séparateur de valeursValue SeparatorVALUE_SEPARATOR | "," |
ToujoursAlways |
Texte placé entre les valeurs d'un attribut qui en a plusieurs (objectClass, telephoneNumber…), en expression Java : " | " donne a | b. Choisissez un séparateur absent des valeurs.
Text put between the values of an attribute that has several (objectClass, telephoneNumber…), as a Java expression: " | " gives a | b. Choose a separator that the values do not hold.
|
| Arrêter en cas d'erreurDie on errorDIE_ON_ERROR | NonNo | ToujoursAlways |
Pour une valeur qui ne se convertit pas dans le type de sa colonne (G-42 dans une colonne Integer). Cochée, le job s'arrête. Décochée, la ligne part dans le lien Reject s'il existe, sinon elle est écartée avec un message sur la sortie d'erreur. Elle ne couvre pas un fichier absent ou mal formé, qui arrête toujours le job.
For a value that does not convert into the type of its column (G-42 in an Integer column). Checked, the job stops. Unchecked, the row goes to the Reject link if there is one, otherwise it is dropped with a message on the error output. It does not cover a missing or badly formed file, which always stops the job.
|
| SchémaSchemaSCHEMA | videempty | ToujoursAlways |
Les colonnes lues, rapprochées des attributs par leur nom. Colonnes à nom réservé : dn, changetype, et pour modrdn newrdn, deleteoldrdn (true ou false), newsuperior. Une colonne d'un autre type que String est convertie ; une colonne byte[] reçoit les octets de la première valeur (voir l'exemple).
The read columns, matched with the attributes by their name. Columns with a reserved name: dn, changetype, and for modrdn newrdn, deleteoldrdn (true or false), newsuperior. A column of another type than String is converted; a byte[] column receives the bytes of the first value (see the example).
|
| ParamètreSetting | DéfautDefault | VisibleShown | Description |
|---|---|---|---|
| EncodageEncodingENCODING | "ISO-8859-15" |
ToujoursAlways |
Malgré son nom, il ne change pas la lecture du fichier, toujours faite en UTF-8. Il sert à décoder les valeurs base64 des colonnes cochées dans Décoder les valeurs d'encodage en Base64, et à produire les octets des colonnes byte[]. Pour du texte, mettez "UTF-8" : avec le défaut, Hélène devient HélÚne (voir les exemples).
Despite its name, it does not change how the file is read, always as UTF-8. It decodes the base64 values of the columns checked in Decode Base64 encoding Values, and produces the bytes of the byte[] columns. For text, set "UTF-8": with the default, Hélène becomes HélÚne (see the examples).
|
| Utiliser les options de champ (vérification du décodage Base64)Use field options (checked for decoding Base64)USE_FIELD_OPTIONS | NonNo | ToujoursAlways | Affiche le tableau suivant. Sans elle, toute valeur non ASCII sort en base64. Shows the next table. Without it, any non-ASCII value comes out in base64. |
| Décoder les valeurs d'encodage en Base64Decode Base64 encoding ValuesTEXTENCODING | décochéesunchecked | Options de champ cochéesField options checked |
Une ligne par colonne du schéma. Base64 coché : la valeur est rendue en texte avec l'Encodage, qu'elle soit écrite nom:: base64 ou en clair dans le fichier. Décoché : une valeur non ASCII reste en base64. Le DN n'en a pas besoin : un dn:: est toujours décodé.
One row per schema column. Base64 checked: the value is turned into text with the Encoding, whether it is written name:: base64 or in clear in the file. Unchecked: a non-ASCII value stays in base64. The DN does not need it: a dn:: is always decoded.
|
NB_LINE (Integer, disponible après l'exécution du composant) : nombre d'entrées lues, y compris celles parties dans le lien Reject ou écartées (voir les erreurs). NB_LINE (Integer, available after the component has run): number of entries read, including those sent to the Reject link or dropped (see the errors).
((Integer) globalMap.get("tFileInputLDIF_1_NB_LINE"))
Le tFileInputLDIF_1 lit un fichier du dossier donné par la variable de contexte folder et envoie ses lignes à un tLogRow_1 en mode Table ; toutes les colonnes sont des String, sauf mention contraire. Un tJava relié par On Subjob Ok affiche NB_LINE. Les fichiers sont fictifs ; les sorties sont celles de la console, copiées depuis une exécution du job. Aucun annuaire n'est contacté.
tFileInputLDIF_1 reads a file of the folder given by the folder context variable and sends its rows to a tLogRow_1 in Table mode; all columns are String, unless stated otherwise. A tJava connected with On Subjob Ok prints NB_LINE. The files are fictitious; the outputs are the console ones, copied from a run of the job. No directory is contacted.
Le fichier people.ldif (la description de la première entrée est repliée sur deux lignes) :
The people.ldif file (the description of the first entry is folded over two lines):
version: 1 # Directory export (fictitious entries) dn: uid=ada,ou=people,dc=example,dc=org objectClass: top objectClass: person objectClass: inetOrgPerson uid: ada cn: Ada Lovelace sn: Lovelace mail: ada@example.org telephoneNumber: +44 20 7946 0001 telephoneNumber: +44 20 7946 0002 description: Wrote the first algorithm intended to be carried out by a mac hine. dn: uid=helene,ou=people,dc=example,dc=org objectClass: top objectClass: person objectClass: inetOrgPerson uid: helene cn:: SMOpbMOobmUgQm91Y2hlcg== givenName: Hélène sn: Boucher mail: helene@example.org
Nom de fichier context.folder + "/ldif/people.ldif", réglages par défaut. Schéma : dn, cn, givenName, mail, telephoneNumber, description. Code du tJava_1 :
File Name context.folder + "/ldif/people.ldif", default settings. Schema: dn, cn, givenName, mail, telephoneNumber, description. tJava_1 code:
System.out.println("NB_LINE: " + globalMap.get("tFileInputLDIF_1_NB_LINE"));
objectClass, uid et sn, absents du schéma, ne sont pas lus.objectClass, uid and sn, missing from the schema, are not read.telephoneNumber d'Ada sont joints par , ; la description repliée est recollée.Ada's two telephoneNumber are joined with ,; the folded description is joined back.cn (en base64 dans le fichier) et givenName (en clair) sortent tous deux en base64 : ils contiennent des accents.For Hélène, cn (in base64 in the file) and givenName (in clear) both come out in base64: they hold accents..--------------------------------------+------------------------+------------+------------------+---------------------------------+------------------------------------------------------------------. | tLogRow_1 | |=-------------------------------------+------------------------+------------+------------------+---------------------------------+-----------------------------------------------------------------=| |dn |cn |givenName |mail |telephoneNumber |description | |=-------------------------------------+------------------------+------------+------------------+---------------------------------+-----------------------------------------------------------------=| |uid=ada,ou=people,dc=example,dc=org |Ada Lovelace |null |ada@example.org |+44 20 7946 0001,+44 20 7946 0002|Wrote the first algorithm intended to be carried out by a machine.| |uid=helene,ou=people,dc=example,dc=org|SMOpbMOobmUgQm91Y2hlcg==|SMOpbMOobmU=|helene@example.org|null |null | '--------------------------------------+------------------------+------------+------------------+---------------------------------+------------------------------------------------------------------' NB_LINE: 2
Avec Séparateur de valeurs " | ", la ligne d'Ada devient (extrait de la table) :
With Value Separator " | ", Ada's row becomes (excerpt of the table):
|uid=ada,ou=people,dc=example,dc=org |Ada Lovelace |null |ada@example.org |+44 20 7946 0001 | +44 20 7946 0002|Wrote the first algorithm intended to be carried out by a machine.|
Le même people.ldif, schéma dn, cn, givenName. Utiliser les options de champ coché, Base64 coché pour cn et givenName. Lu deux fois : Encodage "UTF-8", puis l'encodage par défaut ("ISO-8859-15").
The same people.ldif, schema dn, cn, givenName. Use field options checked, Base64 checked for cn and givenName. Read twice: Encoding "UTF-8", then the default encoding ("ISO-8859-15").
.--------------------------------------+--------------+---------. | tLogRow_1 | |=-------------------------------------+--------------+--------=| |dn |cn |givenName| |=-------------------------------------+--------------+--------=| |uid=ada,ou=people,dc=example,dc=org |Ada Lovelace |null | |uid=helene,ou=people,dc=example,dc=org|Hélène Boucher|Hélène | '--------------------------------------+--------------+---------'
.--------------------------------------+----------------+---------. | tLogRow_1 | |=-------------------------------------+----------------+--------=| |dn |cn |givenName| |=-------------------------------------+----------------+--------=| |uid=ada,ou=people,dc=example,dc=org |Ada Lovelace |null | |uid=helene,ou=people,dc=example,dc=org|HélÚne Boucher|HélÚne | '--------------------------------------+----------------+---------'
En UTF-8, les deux valeurs sont justes. Avec le défaut, les octets UTF-8 de é et è sont lus comme deux caractères ISO-8859-15 chacun : é, Ú.
In UTF-8, both values are right. With the default, the UTF-8 bytes of é and è are read as two ISO-8859-15 characters each: é, Ú.
Le fichier changes.ldif : un ajout, deux modifications, une suppression, un renommage.
The changes.ldif file: an addition, two modifications, a deletion, a rename.
version: 1 dn: uid=grace,ou=people,dc=example,dc=org changetype: add objectClass: top objectClass: person objectClass: inetOrgPerson cn: Grace Hopper sn: Hopper mail: grace@example.org dn: uid=ada,ou=people,dc=example,dc=org changetype: modify replace: mail mail: ada.lovelace@example.org - add: telephoneNumber telephoneNumber: +44 20 7946 0003 telephoneNumber: +44 20 7946 0004 - delete: description - dn: uid=alan,ou=people,dc=example,dc=org changetype: modify delete: mail mail: alan@example.org - add: mail mail: alan.turing@example.org - dn: uid=helene,ou=people,dc=example,dc=org changetype: delete dn: uid=grace,ou=people,dc=example,dc=org changetype: modrdn newrdn: uid=grace.hopper deleteoldrdn: 1 newsuperior: ou=staff,dc=example,dc=org
Schéma dn, changetype, mail, telephoneNumber, description, réglages par défaut :
Schema dn, changetype, mail, telephoneNumber, description, default settings:
.--------------------------------------+----------+----------------------------------------+---------------------------------+-----------. | tLogRow_1 | |=-------------------------------------+----------+----------------------------------------+---------------------------------+----------=| |dn |changetype|mail |telephoneNumber |description| |=-------------------------------------+----------+----------------------------------------+---------------------------------+----------=| |uid=grace,ou=people,dc=example,dc=org |add |grace@example.org |null |null | |uid=ada,ou=people,dc=example,dc=org |modify |ada.lovelace@example.org |+44 20 7946 0003,+44 20 7946 0004|null | |uid=alan,ou=people,dc=example,dc=org |modify |alan@example.org:alan.turing@example.org|null |null | |uid=helene,ou=people,dc=example,dc=org|delete |null |null |null | |uid=grace,ou=people,dc=example,dc=org |modrdn |null |null |null | '--------------------------------------+----------+----------------------------------------+---------------------------------+-----------'
Même job, Ajouter l'opération en préfixe coché : Same job, add operation as prefix checked:
.--------------------------------------+----------+--------------------------------+-------------------------------------+-----------. | tLogRow_1 | |=-------------------------------------+----------+--------------------------------+-------------------------------------+----------=| |dn |changetype|mail |telephoneNumber |description| |=-------------------------------------+----------+--------------------------------+-------------------------------------+----------=| |uid=grace,ou=people,dc=example,dc=org |add |grace@example.org |null |null | |uid=ada,ou=people,dc=example,dc=org |modify |replace:ada.lovelace@example.org|add:+44 20 7946 0003,+44 20 7946 0004|delete | |uid=alan,ou=people,dc=example,dc=org |modify |add:alan.turing@example.org |null |null | |uid=helene,ou=people,dc=example,dc=org|delete |null |null |null | |uid=grace,ou=people,dc=example,dc=org |modrdn |null |null |null | '--------------------------------------+----------+--------------------------------+-------------------------------------+-----------'
Schéma dn, changetype, newrdn, deleteoldrdn, newsuperior :
Schema dn, changetype, newrdn, deleteoldrdn, newsuperior:
.--------------------------------------+----------+----------------+------------+--------------------------. | tLogRow_1 | |=-------------------------------------+----------+----------------+------------+-------------------------=| |dn |changetype|newrdn |deleteoldrdn|newsuperior | |=-------------------------------------+----------+----------------+------------+-------------------------=| |uid=grace,ou=people,dc=example,dc=org |add |null |null |null | |uid=ada,ou=people,dc=example,dc=org |modify |null |null |null | |uid=alan,ou=people,dc=example,dc=org |modify |null |null |null | |uid=helene,ou=people,dc=example,dc=org|delete |null |null |null | |uid=grace,ou=people,dc=example,dc=org |modrdn |uid=grace.hopper|true |ou=staff,dc=example,dc=org| '--------------------------------------+----------+----------------+------------+--------------------------'
description, sans valeur, donne null. Deux opérations sur le même attribut (Alan) sont jointes par :, pas par le séparateur.A modification gives the values of each modified attribute. Without prefix, Ada's replacement does not differ from an addition, and the deletion of description, without value, gives null. Two operations on the same attribute (Alan) are joined with :, not with the separator.dn et changetype. Un renommage donne newrdn, deleteoldrdn (1 devient true) et newsuperior.A deletion only gives dn and changetype. A rename gives newrdn, deleteoldrdn (1 becomes true) and newsuperior.add:alan.turing@example.org : la suppression de alan@example.org qui la précède est perdue. Le modèle (tFileInputLDIF_begin.javajet, lignes 236 à 251) remplace la valeur de la colonne par l'opération à chaque modification de l'attribut, au lieu de l'ajouter à la suite. Sans le préfixe, les deux valeurs restent, mais sans leur opération.
Template defect. With the prefix, Alan's value is only add:alan.turing@example.org: the deletion of alan@example.org that comes before it is lost. The template (tFileInputLDIF_begin.javajet, lines 236 to 251) replaces the column value with the operation at each modification of the attribute, instead of appending to it. Without the prefix, both values stay, but without their operation.
Le fichier accents.ldif, dont le DN est en base64 :
The accents.ldif file, whose DN is in base64:
version: 1 dn:: Y249SMOpbMOobmUgQm91Y2hlcixvdT1wZW9wbGUsZGM9ZXhhbXBsZSxkYz1vcmc= cn:: SMOpbMOobmUgQm91Y2hlcg== sn: Boucher
Schéma dn, changetype, cn, sn ; Base64 coché pour cn seulement, Encodage "UTF-8" :
Schema dn, changetype, cn, sn; Base64 checked for cn only, Encoding "UTF-8":
.---------------------------------------------+----------+--------------+-------. | tLogRow_1 | |=--------------------------------------------+----------+--------------+------=| |dn |changetype|cn |sn | |=--------------------------------------------+----------+--------------+------=| |cn=Hélène Boucher,ou=people,dc=example,dc=org|null |Hélène Boucher|Boucher| '---------------------------------------------+----------+--------------+-------'
Le DN est décodé de lui-même. Une entrée sans changement donne changetype null.
The DN is decoded by itself. An entry without change gives a null changetype.
Le fichier photo.ldif ; /9j/4AAQ est le base64 des octets FF D8 FF E0 00 10 :
The photo.ldif file; /9j/4AAQ is the base64 of the bytes FF D8 FF E0 00 10:
version: 1 dn: uid=ada,ou=people,dc=example,dc=org jpegPhoto:: /9j/4AAQ dn: uid=grace,ou=people,dc=example,dc=org jpegPhoto;binary:: /9j/4AAQ
Schéma dn, jpegPhoto (byte[]). Un tJavaRow remplace le tLogRow et affiche les octets reçus :
Schema dn, jpegPhoto (byte[]). A tJavaRow replaces the tLogRow and prints the received bytes:
StringBuilder hex = new StringBuilder();
if (input_row.jpegPhoto != null) {
for (byte b : input_row.jpegPhoto) {
hex.append(String.format("%02X ", b));
}
}
System.out.println(input_row.dn + " -> " + (input_row.jpegPhoto == null ? "null" : input_row.jpegPhoto.length + " bytes: " + hex.toString().trim()));
Réglages par défaut :Default settings:
uid=ada,ou=people,dc=example,dc=org -> 8 bytes: 2F 39 6A 2F 34 41 41 51 uid=grace,ou=people,dc=example,dc=org -> 8 bytes: 2F 39 6A 2F 34 41 41 51
Base64 coché pour jpegPhoto, encodage par défaut :Base64 checked for jpegPhoto, default encoding:
uid=ada,ou=people,dc=example,dc=org -> 6 bytes: FF D8 FF E0 00 10 uid=grace,ou=people,dc=example,dc=org -> 6 bytes: FF D8 FF E0 00 10
Base64 coché, Encodage "UTF-8" :Base64 checked, Encoding "UTF-8":
uid=ada,ou=people,dc=example,dc=org -> 14 bytes: EF BF BD EF BF BD EF BF BD EF BF BD 00 10 uid=grace,ou=people,dc=example,dc=org -> 14 bytes: EF BF BD EF BF BD EF BF BD EF BF BD 00 10
/9j/4AAQ), pas les octets.By default, the column receives the base64 text (/9j/4AAQ), not the bytes.EF BF BD : pour une colonne binaire, gardez ISO-8859-15.With Base64 checked and the default encoding, it receives the original bytes. In UTF-8, the bytes that do not form a character are replaced with EF BF BD: for a binary column, keep ISO-8859-15.jpegPhoto;binary va dans la colonne jpegPhoto.jpegPhoto;binary goes into the jpegPhoto column.
Mêmes jobs que dans les exemples. Le nom du job est remplacé par MyJob, le dossier de travail par C:\data ; les traces sont abrégées. La fin des messages d'exception vient de Windows, dans sa langue.
Same jobs as in the examples. The job name is replaced with MyJob, the working folder with C:\data; traces are shortened. The end of the exception messages comes from Windows, in its language.
Le fichier staff.ldif ; le numéro de Grace n'est pas un nombre :
The staff.ldif file; Grace's number is not a number:
version: 1 dn: uid=ada,ou=people,dc=example,dc=org cn: Ada Lovelace employeeNumber: 1001 dn: uid=grace,ou=people,dc=example,dc=org cn: Grace Hopper employeeNumber: G-42 dn: uid=alan,ou=people,dc=example,dc=org cn: Alan Turing employeeNumber: 1003
Schéma dn, cn, employeeNumber (Integer). Le lien Reject (clic droit › Ligne › Reject) n'est proposé que si Arrêter en cas d'erreur est décoché ; son schéma est celui du composant, plus errorCode et errorMessage.
Schema dn, cn, employeeNumber (Integer). The Reject link (right-click › Row › Reject) is only offered when Die on error is unchecked; its schema is the component one, plus errorCode and errorMessage.
.------------------------------------+------------+--------------. | tLogRow_1 | |=-----------------------------------+------------+-------------=| |dn |cn |employeeNumber| |=-----------------------------------+------------+-------------=| |uid=ada,ou=people,dc=example,dc=org |Ada Lovelace|1001 | |uid=alan,ou=people,dc=example,dc=org|Alan Turing |1003 | '------------------------------------+------------+--------------' .-------------------------------------+------------+--------------+---------+----------------------------------. | tLogRow_2 | |=------------------------------------+------------+--------------+---------+---------------------------------=| |dn |cn |employeeNumber|errorCode|errorMessage | |=------------------------------------+------------+--------------+---------+---------------------------------=| |uid=grace,ou=people,dc=example,dc=org|Grace Hopper|null |null |For input string: "G-42" - Line: 1| '-------------------------------------+------------+--------------+---------+----------------------------------' NB_LINE: 3
null.The rejected row keeps the values already converted; the one in error is null.errorCode n'est jamais rempli. Le numéro après Line: est le rang de l'entrée compté à partir de 0 (Grace est la deuxième), pas une ligne du fichier.errorCode is never filled. The number after Line: is the rank of the entry counted from 0 (Grace is the second one), not a line of the file.NB_LINE compte aussi l'entrée rejetée.NB_LINE also counts the rejected entry.Même job sans le tLogRow_2. Le message part sur la sortie d'erreur, la ligne de Grace est écartée : Same job without tLogRow_2. The message goes to the error output, Grace's row is dropped:
For input string: "G-42" .------------------------------------+------------+--------------. | tLogRow_1 | |=-----------------------------------+------------+-------------=| |dn |cn |employeeNumber| |=-----------------------------------+------------+-------------=| |uid=ada,ou=people,dc=example,dc=org |Ada Lovelace|1001 | |uid=alan,ou=people,dc=example,dc=org|Alan Turing |1003 | '------------------------------------+------------+--------------' NB_LINE: 3
Même job, case cochée : le job s'arrête sur Grace (code 1), rien n'est affiché. Same job, box checked: the job stops on Grace (exit code 1), nothing is printed.
Exception in component tFileInputLDIF_1 (MyJob) java.lang.NumberFormatException: For input string: "G-42" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) at java.base/java.lang.Integer.parseInt(Integer.java:662) at java.base/java.lang.Integer.parseInt(Integer.java:778) at routines.system.ParserUtils.parseTo_int(ParserUtils.java:122) at routines.system.ParserUtils.parseTo_Integer(ParserUtils.java:137) …
Le fichier broken.ldif, dont la ligne 7 n'a pas de :, lu avec Arrêter en cas d'erreur décoché :
The broken.ldif file, whose line 7 has no :, read with Die on error unchecked:
version: 1 dn: uid=ada,ou=people,dc=example,dc=org cn: Ada Lovelace dn: uid=grace,ou=people,dc=example,dc=org cn Grace Hopper
Exception in component tFileInputLDIF_1 (MyJob) java.io.IOException: line 7: no ':' found at netscape.ldap.util.LDIF.throwLDIFException(LDIF.java:647) at netscape.ldap.util.LDIF.parse_ldif_content(LDIF.java:225) at netscape.ldap.util.LDIF.parse_ldif_record(LDIF.java:160) at netscape.ldap.util.LDIF.nextRecord(LDIF.java:111) …
Le job s'arrête (code 1) : une erreur de lecture du fichier ne passe ni par Arrêter en cas d'erreur, ni par le lien Reject. Le tLogRow en mode Table, qui n'affiche qu'à la fin, n'affiche rien, et le tJava relié par On Subjob Ok ne s'exécute pas. The job stops (exit code 1): a file reading error goes neither through Die on error nor through the Reject link. The tLogRow in Table mode, which only prints at the end, prints nothing, and the tJava connected with On Subjob Ok does not run.
Nom de fichier context.folder + "/ldif/missing.ldif", Arrêter en cas d'erreur décoché : le job s'arrête quand même (code 1).
File name context.folder + "/ldif/missing.ldif", Die on error unchecked: the job stops anyway (exit code 1).
Exception in component tFileInputLDIF_1 (MyJob) java.io.FileNotFoundException: C:\data\ldif\missing.ldif (Le fichier spécifié est introuvable) at java.base/java.io.FileInputStream.open0(Native Method) …
Pour un fichier facultatif, testez-le avant avec un tFileExist et un lien Run if. For an optional file, test it first with a tFileExist and a Run if link.
Sans réglage, un nom accentué sort en base64, qu'il soit en clair ou non dans le fichier. Cochez Base64 pour les colonnes de texte, avec l'Encodage "UTF-8" ; gardez le défaut pour les colonnes byte[].
Without setting, an accented name comes out in base64, whether it is in clear in the file or not. Check Base64 for the text columns, with the Encoding "UTF-8"; keep the default for the byte[] columns.
Le lecteur LDIF (bibliothèque ldapjdk) lit toujours de l'UTF-8, comme le veut le format, quel que soit l'Encodage. Les accents d'un fichier en ISO-8859-1 ou en Windows-1252 n'y sont pas de l'UTF-8 valide : convertissez-le d'abord avec un tChangeFileEncoding. The LDIF reader (ldapjdk library) always reads UTF-8, as the format requires, whatever the Encoding. The accents of a file in ISO-8859-1 or Windows-1252 are not valid UTF-8 there: convert it first with a tChangeFileEncoding.
Seul le nom compte, pas la place : une colonne mal nommée reste null sans message. Le DN va dans la colonne nommée dn, contrairement au tFileOutputLDIF, qui prend toujours la première colonne.
Only the name counts, not the position: a badly named column stays null with no message. The DN goes into the column named dn, unlike tFileOutputLDIF, which always takes the first column.
Avec une colonne changetype, un tFilterRow sépare les ajouts, modifications, suppressions et renommages. Pour une modification, cochez le préfixe d'opération, en sachant qu'il ne garde que la dernière opération d'un attribut.
With a changetype column, a tFilterRow splits additions, modifications, deletions and renames. For a modification, check the operation prefix, knowing that it only keeps the last operation of an attribute.
Le composant accepte un lien Iterate : derrière un tFileList, mettez ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) dans Nom de fichier pour lire tous les .ldif d'un dossier.
The component accepts an Iterate link: after a tFileList, put ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) in File Name to read all the .ldif files of a folder.
Le composant ne lit qu'un fichier. Pour interroger directement un annuaire LDAP, la palette a d'autres composants (tLDAPInput). The component only reads a file. To query an LDAP directory directly, the palette has other components (tLDAPInput).
tFileOutputLDIF · écrire un fichier LDIFwrite an LDIF filetFileList · lire tous les fichiers LDIF d'un dossierread all the LDIF files of a foldertFilterRow · séparer les types de changementssplit the change typestFileOutputDelimited · écrire les entrées en CSVwrite the entries as CSVtChangeFileEncoding · passer un fichier en UTF-8 avant de le lireturn a file into UTF-8 before reading ittFileInputDelimited · lire un fichier délimitéread a delimited file