How to create a function using the functions API in databricks?

chinmay0924
New Contributor III

https://docs.databricks.com/api/workspace/functions/create

This documentation gives the sample request payload, and one of the fields is type_json, and there is very little explanation of what is expected in this field. What am I supposed to pass here?

 

SP_6721
Honored Contributor II

Hi @chinmay0924 ,

The type_json field describes your function’s input parameters and return type using a specific JSON format. You’ll need to include each parameter’s name, type (like "STRING", "INT", "ARRAY", or "STRUCT"), and position, along with the return type.

View solution in original post