This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Oh no! The Community appears to be haunted! Help us find all the spooky specters here.
We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email firstname.lastname@example.org for assistance.
I have sent a Blob field into a Python tool before with good success. I could read it as a bytearray and all was rainbows and yellow brick roads.
However, I'm trying to read a file as binary in the Python tool, into a bytearray and send it out of the Python tool as a Blob field. I assumed this would work, but it doesn't seem to work right. Is there guidance on this yet?
Looks like the CachedData.py write() function uses pandas' .dtypes and not python's type() to determine the data types of the columns, which makes sense. Pandas understands a string of python 'bytes' to be an 'object' type, which is the same for a regular string. So when DatastreamUtils.py __pandasFieldTypeAttributes() is called, it maps the bytes 'object' to a V_WString.
Looks like there's a __pythonFieldTypeAttributes() started, so my hopes are that we can eventually add python 'bytes' to this conversion to allow output of binary files as Blob fields.
In the meantime, I compromised and sent a temporary file path out of the Python tool and read the file using a Blob Input tool instead. It would have been cleaner and nicer to be able to do it in the Python tool, but we do what we can ...