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.
Customize & extend the power of Alteryx. SDKs, APIs, custom tools, and more!
General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!
I am creating a custom download tool using the Python SDK. The output will include lengthy 30k+ lines of JSON string response. The documentation for the class Field denotes "string" to be used for all possible string data types in Alteryx. But add_field or add_field_from_xml method for RecordInfo is also asking for a fixed size, in absence of which, the following error is thrown:
self.rio = Sdk.RecordInfo(1)
# using Add Field From XML
self.rio.add_field_from_xml("<Field name=\"DownloadHeders\" type=\"V_String\" >")
self.rio.add_field_from_xml("<Field name=\"DownloadData\" type=\"V_String\" >")
# Using Add Field
In the scenario where I do specify the size and it exceeds the limit, following warning and error is thrown
So my question is how do I use v_string i n the python code without having to specify a fixed size for the field?
Hi @fardeen9983 , use Sdk.FieldType.v_string to add a V_String field. You will need to specify the max number of characters that field can hold, which I tend to default to the max possible of 2147483647. The actual size of the field will vary with the size of the data being stored. The function call would look something like this: