pythonblobdolphindb

How to download and save BLOB data to local storage through DolphinDB Python API?


When I save a table with PROTOCOL_PICKLE, an error occurs: Server response: 'pickle not support BLOB. IP[]. uuid[]. int128[]'.

The following is my script:

t = loadTable("dfs://GILDATA.LC_ANNOUNCEMENT", `data)
select * from t where companycode = '187163' and category = 4 order by infopubldate desc limit 100
//result from the API
￵{"emojiDesc":"","emojiUrl":"","hasSourceImage":false,"hashCode":17223055,"height":73,"srcPath":"/storage/emulated/0/Android/data/com.tencent.wework/files/imagecache/imagemsg2/5/5dbd98da0d44bff89f48882dfa38366d.0","thumbPath":"/storage/emulated/0/Android/data/com.tencent.wework/files/imagecache/imagemsg2/6/6815099d982e9c4fef058ea1c5494bbd.0","width":1130,"wwFileId":""}￰

Solution

  • PROTOCOL_PICKLE does not support some special data types. You can modify it to the PROTOCOL_DDB when creating the session (by specifying enablePickle=False or protocol=keys.PROTOCOL_DDB).