Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.

Outputting visual information to be displayed in the Browse tool

elatt
7 - Meteor

I haven't used it directly but I've seen in the docs for the R tool that there are some Alteryx specific functions such as AlteryxGraph() and write.AlteryxGraphMetainfo() that allow outputting R graphs to a downstream connecting that can be viewed by the Browse tool. Is there anything equivalent in the Python SDK? Or more generically is there any type of docs on how information should be formatted so the browse tool could visualize it or can we build our own graphs (similar to what is done in R) for visualization? Is the Browse tool launching R on the backend to be able to visualize that graph or are these graphs a standard data format that we could simulate from the Python SDK? Finally, does the Browse tool support PNG images where if we can't do the above, could we just generate some raw images and pass them as output and the Browse tool would know how to display them?

6 REPLIES 6
MichaelCh
Alteryx
Alteryx

There is nothing in the Python SDK that explicitly supports passing graphs or images downstream. If it were a matter of passing that kind of data down to another Python tool you could use the Blob data type to store arbitrary binary in a record.

 

I am pretty sure the Reporting tools use a custom format called PCXML (similar to HTML) to handle the reporting snippets generated by the tools. I am not sure what format the R or Charting tools use for passing their images around internally.

I'll look into this some more and see if I can find someone with expertise in this area to comment on this question.

AlexK
Alteryx
Alteryx

The Browse tool does support PNG but you would have to access the images with an Image tool and then feed the images into a Browse tool. 
Capture.PNG

wthompson
Alteryx
Alteryx

Currently, the Python SDK does not provide GetAs or SetFrom Blob field type, it is on our list of field types to add support for in the Python SDK.  Until that solution is available, a temporary workaround would be to save the image as a png image on disk and passing that file name out to an image tool.

cam_w
11 - Bolide

@wthompson  -- Has the Python SDK since been updated to allow use of Blob inputs and outputs? If so I could use it for a solution I'm working on. If not, will it be announced in the Release Notes when/if it happens?

BlytheE
Alteryx Alumni (Retired)

Hi @cam_w - the documentation for the Python SDK shows a get_as_blob and set_as_blob option under the Field class. Have you tried using those to output a visualization?

cam_w
11 - Bolide

@BlytheE - thanks for the link to the documenation! That's a "yes" to my question then, I assume? I have not tried it yet.

 

I was searching for this information before I asked the questions, so I don't know why the SDK documentation didn't come up near the top of the search results ... oh well!

 

I didn't look at the SDK documentation because I was trying to build in the Python tool for the sake of my colleagues who are not developers and might want to expand upon my work in the future. The Python tool make it easier to do that, but during my research I found that I can't (yet) use this to output a Blob field type:

 

https://community.alteryx.com/t5/Dev-Space/How-to-output-Blob-field-from-Python-tool/td-p/421015

 

Trying really hard over here to learn the right way to use each tool!