using pycspro library to retrieve parse dictionary and cases from csweb

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
munkab
Posts: 1
Joined: September 6th, 2022, 1:27 pm

using pycspro library to retrieve parse dictionary and cases from csweb

Post 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.
savy
Posts: 159
Joined: December 27th, 2012, 1:36 pm

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

Post 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>';
Post Reply