Information about using the api/batch/migrate function call

39 views
Skip to first unread message

Janet McDougall - Australian Data Archive

unread,
Mar 14, 2017, 9:17:25 PM3/14/17
to Dataverse Users Community
Following my post "Importing Nesstar DDI & data into Dataverse 4x", Marina (webdev) has been testing some tools and has this question:

We have been exploring using different api functions to import our datasets into dataverse.

The GET api/batch/migrate function call looked promising ("Import single or multiple datasets that are in the local filesystem") but there does not seem to be any documentation to indicate the expected structure of the directory to import.


http://hostname:8080/api/batch/migrate?path="path_to_directory"&key="API_KEY"&dv="alias or id"&createDV="FALSE"


This calls the Java method:

class BatchImport getImport()
which eventually calls the class BatchServiceBean processFilePath() and/or the handleDirectory() method(s).


QUESTIONS:

What is the expected import directory structure?
[Is each subdirectory expected to be the name of a dataverse with dataset subdirectories?
Or something different?]

What are the different file formats the function(s) is/are expecting in order to import the files in the correct way? .xml? .txt? etc.

Will a directory's .sav file be ingested as a data file?


We have tried different permutations and keep getting NullPointerExceptions so we would like to know how to use this batch API call.


example (is this correct?):

- top-directory
        - dataset 1
            - datafile
            - extra document 1
            - extra document 2
            - ...
        - dataset 2
            - ...
            -
            
        - ...
        - dataset n
            - ...
         

Philip Durbin

unread,
Mar 14, 2017, 9:59:13 PM3/14/17
to dataverse...@googlegroups.com
Thanks for the additional information. As I just mentioned in https://groups.google.com/d/msg/dataverse-community/qsY8swD9Hh0/9C_dT4g4AAAJ there was some recent chatter on this topic of importing DDI files in https://github.com/IQSS/dataverse/issues/3632 but it's not well supported. Maybe some who knows more about how it works can chime in. You're also welcome to email sup...@dataverse.org

Phil

--
You received this message because you are subscribed to the Google Groups "Dataverse Users Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dataverse-community+unsub...@googlegroups.com.
To post to this group, send email to dataverse-community@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dataverse-community/a016f771-522b-490c-a19f-e4a20757be2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages