Skip to main content
Extracts information from text using the given field names.

Syntax

Arguments

  • input: A VARCHAR expression containing the text to extract information from.
  • labels: A nonempty constant ARRAY<VARCHAR> containing the field names to extract.
For the types and default behavior of provider and model, see Common calling rules.

Return value

Returns a nullable JSON object. The database asks the model to put the extracted fields and their values in a response object and use JSON null for any value it cannot find. For example, when asked for a name and a city, the model might return {"response":{"name":"Alice","city":"Paris"}}. The database only checks that the result is a JSON object. It does not check the structure of response or the accuracy of the extracted values.

Examples