The Alteryx Python tool currently throws an error if the inbound record set has zero rows (screenshot 1).
In order to manage that - you need to create try-except block around the Alteryx.read that instead creates an empty record set data frame. (screenshot 2). This is inefficient because every time you change the canvas before the python tool, you need to re-code a static field list into the try-except block (i.e. you can no-longer deal with variable fields)
Please could you change the Alteryx.read method to create a zero-record dataframe with the correct column names if the input is zero-length?