How do i import csv data to KoBoToobox server?

Hi,

I had to shutdown an old (and buggy) KoboToolbox server.
Before I did, I exported data from several projects in CSV files.

After spending some time to look for a solution on Internet, I still can’t re-import properly those data. There is too much entries to do it manually.
I’ve heard of 2 solutions which cannot really fulfill my need.

First, I know I can use pull-data. But this isn’t a real import, it’s just creating a new form with reference too old data. The problems here are :

  • it’s too complicated, you need to map all the fields and I’ve got pretty big forms. By the way, the forms were imported very quickly as XLS files.
  • it doesn’t allow me to enter metadata, like the time when data was collected, by who and on which device_id.

I thought a better solution was available using the API, but again it was a fail.
I’ve tried to get the id of one form, that was the easy part. Then, even on a recent server (installed this week using the last kobo-install project on github, inside a docker container), I’ve got a weird bug.

The API shows I’m supposed to be able to import CSV files (see screenshot from our actual kobocat server)

But when I use curl, I receive an HTML answer saying :

We no longer recommend using the legacy interface. Please access all our new features in the new interface (new map, table, reports, labeled data exports, etc.). If you have deployed your project directly in the legacy interface, there is no way to use these new features. This legacy interface will be removed shortly.

I found this message very unclear about what interface it’s talking about, and it doesn’t provide any link to understand the situation.
Anyway, I wasn’t able to import the data.

I think importing data from another server is a pretty basic feature but I couldn’t find a simple way to do it. Is there any hope to see this implemented soon? Or maybe someone can help me to understand the API.

Thanks.

Hi,
I understand your frustration. Unfortunately the answer to this is pretty simple. We do not support the functionality of importing data from one server. You also cannot import data sitting on CSV files onto a project directly. You can however do this using the workarounds provided for advanced users as seen in the subsequent messages on this topic.

Stephane

OK, thanks for the answer.
At least I now know I can’t count on this feature.

Hi @pasteurlaos,

Would you mind having a look at the workaround outlined by @tinok. It should solve your issue:

Have a great day!

Hi @Kal_Lam,
I’m not a python developper, but I’ll have a look anyway, thanks.

1 Like