MongoDB submission data migration

Hi all,

I’m currently working on a script that will allow me to fetch submissions data from a form, clean and format the data and eventually store it into a MySQL database. One of the issues I’m facing is that the submission data stored in Kobo MongoDB (formhub → instances) has keys that correspond to the survey questions but these keys are incomplete in case of very long questions,

Screen Shot 2021-05-07 at 12.31.59 PM

In the above screenshot, you will see that one of the questions is “group_ex2km22/In_what_year_was_you_organiza” - the original question in the survey is “In what year was your organization founded?” Since this data is incomplete, it is becoming very difficult to identify the question (from mysql, which I already have). Is there any way that I can obtain the entire question text in the mongo document? Can someone help with this? Thanks!
CC: @Kal_Lam

I don’t know anything about MongoDB limitations, but can’t this be solved by renaming the questions in the form to have shorter names?

Hi @ks_1 - Thanks for your reply! Unfortunately there is no scope to decrease the size of the survey questions. Some of them are way too long and are meant to be that way. I’m building this for a client and I don’t have an option! Is there a way on Kobo (maybe some settings or config) that allows me to store the entire question name?

You don’t have to shorten the survey question, just the names of the questions.

Hey @ks_1, Thanks, got it! So you mean shortening the survey question names in the Form Builder, right? Will try and let you know if that worked! Also, are you aware about the restrictions on the length of the names?

No, sorry. I’m not aware of the exact character limitations.