Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Periodical data pull via web service or other method

Can you please direct me to the relevant place for pulling collected data?

Preferably, there should be a way to push the data of every performed survey from Sawtooth to another location (FTP / web service / Etc.).

Is there such an option? If so, where is it documented?
asked Aug 6, 2015 by anonymous

2 Answers

0 votes
Once you login to the admin module, you can select the 2nd option from the top - Download. From there you can select the path as to where you would like to save your survey data.

Your survey data will be saved as <study name>_data.csv. Within the Sawtooth Software authoring tool, you can import the survey data in. This will create a <study name>_data.db3 file. At this point you can define many export definitions and export the data to formats such as Excel, csv, txt/lay, SPSS, etc.

Your user name and password for the online admin module are set in the Field | Web Server Management menu.

Look up the admin module in the Sawtooth Help by hitting the F1 key for further information.
answered Aug 6, 2015 by Paul Moon Platinum (70,440 points)
0 votes
Edit: I should make sure to mention that some studies of great size, either with many many respondents and/or many many data fields could take a very long time to download in this fashion. If downloading manually takes more than a few minutes, you'd probably want to make sure that you're careful about naming your output files so they don't overwrite (i.e. file1.csv, file2.csv, etc). I've helped someone with a study with 30,000+ respondents with 50,000+ data fields, and it took 10 hours to download in the admin module with this type of method, even though the resulting .csv was just 200k or so. In that case, I'd recommend downloading the data inside SSI Web 8.4.6 as Paul Moon suggested, since it will take that 10 hour process down to a handful of minutes.

It is currently not a feature of the SSI Web admin module to have it "push" data from the study to another place. It is, however, simple to automate a "pull". If you have a computer or server that can use some sort of scheduled task, such as the Cron job scheduler, then you simply have to do a web request to the relevant place.

I don't think this is terribly complicated, but I am a web/server developer, so hopefully this really is simple, and not "I do this all day so it seems easy" simple.

Here's a simple example using the linux/unix command-line utility, curl (http://curl.haxx.se/):
 curl -X POST http://SERVERNAME/STUDY-FOLDER-NAME/cgi-bin/admin.pl -d "hid_page=download_all&hid_studyname=STUDYNAME&hid_javascript=1&username=ADMINUSERNAME&password=PASSWORD" > filename.csv 


Basically, just make a POST request to the admin.pl file at the correct URL, and use the following in the POST data body:

hid_page=download_all&hid_studyname=STUDYNAME&hid_javascript=1&username=ADMINUSERNAME&password=PASSWORD


Another quick example with wget (https://en.wikipedia.org/wiki/Wget)
wget --post-data="hid_page=download_all&hid_studyname=CBC&hid_javascript=1&username=admin&password=PASSWORD" http://server-name.com/STUDY-FOLDER-NAME/cgi-bin/admin.pl  > filename.csv
answered Aug 6, 2015 by Jonathan Huff Bronze (1,575 points)
edited Aug 6, 2015 by Jonathan Huff
...