Databricks icon

Databricks

Interact with Databricks API

Unity Catalog → Create Function

AI-generated

Summary

Create a new function in Databricks Unity Catalog specifying its name, input parameters, return type, and routine body language.

Inputs

  • Catalog (required) — The catalog to use, selectable from a list or specified by name.
  • Schema (required) — The schema to use, selectable from a list or specified by name.
  • Function Name (required) — Name of the function to create.
  • Input Parameters (required) — Array of input parameters for the function as JSON, e.g., [{"name": "param1", "type_name": "STRING"}].
  • Return Type (required) — The return type of the function, such as STRING, INT, or DOUBLE.
  • Routine Body (required) — The language of the function body (e.g., SQL).

Output shape

a single JSON object containing the newly created function's details

The response includes the created function's metadata; errors will be thrown if creation fails.

Links

Discussion