Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Pass blob image into Python (e.g. PIL)

atn0314
5 - Atom

I have a set of images stored as a blob, and I would like to pass them into the Python tool and use some functions with the PIL package (e.g. this or this). However, I'm a Python newbie, and most of the code examples I've found so far using PIL involve specifying an image saved somewhere on my computer rather than something already in the data stream.

 

How can I get Python to import the blobs for use with PIL? Would I have to use the Blob Output tool to export all of these images and then load them one-by-one into Python?

 

Thanks for your help.

1 REPLY 1
apathetichell
18 - Pollux

I do not believe you can do what you are trying to do without exporting the blobs to files.

 

1) Looking at those packages it looks like they take files locations not python variables in as parameters.

2) When Alteryx sends data into Python it is sent as a dataframe. I do not believe Blobs are supported elements of a dataframe.  Someone who knows more than me about Python can correct me..

 

Could you send in a blob as text and then have it populate an element of a dataframe? Could you then convert it in Python to a blob from text? Sure. But that seems like a lot more work than sending in a file location.

 

Labels