Passing List of Params while Calling REST API using PythonUDx
pritesh
Vertica Customer ✭
Hi Team,
I need a quick help in getting to know that: How can I pass below request packet to udx function which will call api with this request format,
Request:
[ {
"id" : ,
"values" : {
"variable_name1" : "value1",
"variable_name2" : "value2",
} },
{
"id" : ,
"values" : {
"variable_name1" : "value1",
"variable_name3" : "value3",
} }
]
Thanks
Tagged:
0
Answers
Could you elaborate more on the use case and data flow? If this is a parameter to the UDx, I would think you could convert to string and pass as VARCHAR. Or is it used inside the UDx? If so, return as string / VARCHAR, then parse into a flex table or flex column.
Hi Bryan,
arg1=[{},{},{}]
Let say, my udx function is GetApiResponse(arg1). In this scenario, how it will work as I want to pass list as a param to Udx function.
Thanks !!
How about this python script "json_demo.py":
Use this SQL to test:
Thanks Bryan !!