Querying blob files in database, is it possible to read as text from blob files rather than array
Here my simple code:
sql= "select blob_file as blob_file from Blob_Table limit 1"
cursor.execute(sql)
result = cursor.fetchall()
for i in result :
print i["file_backup"]
My output is something like these, an array.array type:
array('b', [67, 97, 114, 114, 105, 101, 114, 32, 73, 68, 44, 83, 116, 97, 103, 101, 32, 82, 111, 119, 44, 83, 116, 97, 103, 101, 32, 67, 111, 108, 117, 109, 110, 44, 68, 97, 116, 101, 44, 84, 105, 109, 101, 44, 65, 65, 66, 32, 50, 76, 32, 68, 101, 112, 116, 104, 44, 65, 65, 66, 32, 67, 97, 118, 105, 116, 121, 32, 82, 97, 44, 65, 65, 66, 32, 67, 97, 118, 105, 116, 121, 32, 68, 101, 112, 116, 104, 44, 65, 65, 66, 32, 65, 66, 83, 32, 81, 117, 97, 108, 105, 116, 121, 32, 111, 102, 32, 70, 105, 116, 44, 67, 111, 110, 102, 105, 103, 32, 110, 97, 109, 101, 40, 110, 97, 109, 101, 32, 111, 110, 108, 121, 41, 44, 65, 65, 66, 32, 65, 66, 83, 32, 80, 105, 120, 32, 67, 111, 117, 110, 116, 44, 65, 65, 66, 32, 50, 110, 100, 32, 76, 118, 108, 32, 80, 105, 120, 32, 67, 111, 117, 110, 116, 44, 65, 65, 66, 32, 67, 97, 118, 105, 116, 121, 32, 80, 105, 120, 32, 67, 111, 117, 110, 116, 44, 65, 65, 66, 32, 67, 97, 118, 105, 116, 121, 32, 82, 113, 44, 65, 65, 66, 32, 65, 66, 83, 32, 81, 117, 97, 100, 32, 67, 114, 111, 119, 110, 44, 84, 101, 109, 112, 108, 97, 116, 101, 32, 70, 105, 116, 32, 81, 117, 97, 108, 105, 116, 121, 44, 84, 101, 109, 112, 108, 97, 116, 101, 32, 82, 111, 116, 97, 116, 105, 111, 110, 44, 84, 101, 109, 112, 108, 97, 116, 101, 32, 88, 32, 84, 114, 97, 110, 108, 97, 116, 105, 111, 110, 44, 84, 101, 4, 54, 13, 10])
Is possible to convert these because my blob file is pure text from csv..