Page 1 of 1

using pycspro library to retrieve parse dictionary and cases from csweb

Posted: September 6th, 2022, 2:01 pm
by munkab
Hi, I am working on a data visualization solution with the pycspro library.
As a reminder, this library takes as parameters a dictionary and a list of cases. I manage to find the dictionaries deployed in csweb in a table named cspro_dictionaries, the cases are in a table with the name of the corresponding dictionary suffixed with _dict (Example: household_dict) with a column named questionnaire hosting a hexadecimal information in blob format. Ie believe this information represents the cases of cspro. But how to decode this information in order to use it together with the dictionary to parse the data with the pyscpro library.

This problem has been bothering me for more than a month. Thanks for your help.

Re: using pycspro library to retrieve parse dictionary and cases from csweb

Posted: September 19th, 2022, 11:29 am
by savy
Questionnaire content is stored as compressed JSON. Easiest way to view a case is using MySQL Workbench using the query

Code: Select all

SELECT uncompress(questionnaire) FROM DICT_NAME where caseids = '<your caseid string>';