You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-04-30 23:30:13

jejeroro
Member
Registered: 2011-09-05
Posts: 100

Plugin Data injection,ne comprends pas les erreurs

Bonjour
Je n'arrive pas à importer un inventaire car:
1) je ne comprends pas comment il faut fournir les donnees dans le CSV à importer , alors que le modele est accepté,
surtout si un champ est le lieu d'un élément , le plugin sait il reconnaitre les strings de la table des lieux? ,
yatil des caracteres interdits ( . : _ - )?
2) je ne vois nulle part dans le doc du plugin comment interpreter le fichier d'erreur Error-*liste*.csv
Merci

Jejeroro

Offline

#2 2022-05-03 21:12:16

mrsoliveira
Member
Registered: 2017-02-15
Posts: 10

Re: Plugin Data injection,ne comprends pas les erreurs

jejeroro wrote:

Bonjour
Je n'arrive pas à importer un inventaire car:
1) je ne comprends pas comment il faut fournir les donnees dans le CSV à importer , alors que le modele est accepté,
surtout si un champ est le lieu d'un élément , le plugin sait il reconnaitre les strings de la table des lieux? ,
yatil des caracteres interdits ( . : _ - )?
2) je ne vois nulle part dans le doc du plugin comment interpreter le fichier d'erreur Error-*liste*.csv
Merci

Jejeroro


I wait for the same answer:
How to inform in the CSV where the object should be inserted.
I appreciate any and all help.

https://github.com/pluginsGLPI/datainjection/issues/251

Offline

#3 2022-05-04 22:20:27

jejeroro
Member
Registered: 2011-09-05
Posts: 100

Re: Plugin Data injection,ne comprends pas les erreurs

Hello

Finally , I managed the injection.
You can follow the instructions in the videos :
https://plugins.glpi-project.org/#/plugin/datainjection

In the model form (/plugins/datainjection/front/model.form.php) you must provide the type of data you want to inject.
In my case, i wanted ton inject a list of misc devices , in a table created by the plugin "generic objects". So select the right type of data : location, computers, vendors....

Follow the video. They tell you how to set the correspondances between the columns in your CSV file and the fields already existing in the GLPI tables.

In my CSV I had 3 columns :
- the device name (as a string text with ") new in GLPI  -> field machine-name
- a comment( as a text string with ") new in GLPI -> field machine-comment
- the location name (as a text string with ")
But all the locations were already in the GLPI table . Hence before import my CSV file, I had to replace , with a text editor ,all the locations name (with ") by their ID under GLPI , without "!
And then , the importation could take place without error.

Example of CSV OK:
"DeviceName";"Comment";locationID
"device 1" ; "blue machine; 3
"device 2" ; "yellow machine"; 3
"device 3" ; "green machine" ; 2

assuming that location ID 2 & 3  are already defined in the GLPI location table.

I presume that the right method is to inject 1 table at a time . I did'nt try for example , to inject together the material names to the device table, the vendor names, to the vendor table and the location names to the location table at the same time.
Good luck
Regards   

Jejeroro

Offline

Board footer

Powered by FluxBB