How to process BLOB data in python node

I just have some proprietary BLOB data (actually LONGVARBINARY) in a MySQL database which I need to unpack. Therefore I would like to put it to a python node.
Is there any proper way to get the binary data as byte array to python?

I tried blob wich turned out to appear as hex dump in the DataFrame and a mapped string where I did not manage to get the byte array in python.

It’s probably easier for people to help if you upload a sample knime flow with sample data
As an idea have a look at the struct module to unpack the data into a byte array


1 Like

Hi, it’s not that easy to get separate some data, since I guess the issue is the interface MySQL DB via KNIME to python.
KNIME says data is some kind of BL/OB, but I’ve no idea what to do with this data type. Is there any description how to deal with this data? And since I already have some working routine in Python: Who to get this data to Python?

found a solution: just query the data in bas64 format using
SELECT TO_BASE64(Data) from table
this is a string and can be transferred and handled by KNIME Python interface


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.