dspace import csv MalformedSourceException error

29 views
Skip to first unread message

Humberto Blanco Castillo

unread,
May 23, 2020, 10:52:36 AM5/23/20
to DSpace Technical Support
Hi, 
Im trying to import only metadata cvs file to dspace, im exec the following command:

/repository/bin/dspace import -b -m /tmp/MapFile -e hbla...@gmail.com  -c 102266/20995 -s /tmp/Dspace_import_test.txt -i csv -w -n -t

and get the following error: 

Owning  Collection: Articulos_test
INFO: Dataloader will load data from the file specified in the command prompt (and not from the Spring XML configuration file)
INFO: Dataloader gr.ekt.bteio.loaders.CSVDataLoader@38154c71 will be used for the import!
Exception
gr.ekt.bte.exceptions.MalformedSourceException: The requested column 1 does not exist
at gr.ekt.bteio.loaders.CSVDataLoader.getRecords(CSVDataLoader.java:97)
at gr.ekt.bteio.loaders.CSVDataLoader.getRecords(CSVDataLoader.java:125)
at gr.ekt.bte.core.TransformationEngine.transform(TransformationEngine.java:87)
at org.dspace.app.itemimport.ItemImportServiceImpl.addBTEItems(ItemImportServiceImpl.java:240)
at org.dspace.app.itemimport.ItemImportCLITool.main(ItemImportCLITool.java:381)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
gr.ekt.bte.exceptions.MalformedSourceException: The requested column 1 does not exist
at gr.ekt.bteio.loaders.CSVDataLoader.getRecords(CSVDataLoader.java:97)
at gr.ekt.bteio.loaders.CSVDataLoader.getRecords(CSVDataLoader.java:125)
at gr.ekt.bte.core.TransformationEngine.transform(TransformationEngine.java:87)
at org.dspace.app.itemimport.ItemImportServiceImpl.addBTEItems(ItemImportServiceImpl.java:240)
at org.dspace.app.itemimport.ItemImportCLITool.main(ItemImportCLITool.java:381)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
gr.ekt.bte.exceptions.MalformedSourceException: The requested column 1 does not exist


this says that the column 1 dos not exist, i review the wiki ( https://wiki.lyrasis.org/display/DSDOC6x/Batch+Metadata+Editing#BatchMetadataEditing-FileStructure) there says that the first column must be the item id but its a new import and not have item_id. 

Any idea

Humberto

Shaun donovan

unread,
May 25, 2020, 4:08:25 AM5/25/20
to Humberto Blanco Castillo, DSpace Technical Support

Hi Humberto.

The "import" function is for importing via the "Simple Archive Format", not from a csv file. You would need to take the CSV file and build a SAF structure, and then import it. You can get this information from https://wiki.lyrasis.org/display/DSDOC6x/Importing+and+Exporting+Items+via+Simple+Archive+Format

Kind Regards.

Shaun

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/a2ae09df-f700-42e6-be8d-46559d46abaf%40googlegroups.com.

Fatih Güneş

unread,
May 26, 2020, 11:34:25 AM5/26/20
to DSpace Technical Support
Dear Humberto,
As far as I remember, you need to add a plus sign (+) for id, when trying to insert.
Have a try, good luck.
Reply all
Reply to author
Forward
0 new messages