Skip to main content

json_schema.png JSON Schema Tool

用户角色要求

用户角色*

工具/功能访问

完整用户

基本用户

X

*适用于 Designer 版本 2025.1+ 上的 Alteryx One专业版和企业版客户。

Use the JSON Schema tool to generate a JSON schema that defines structured output. You can use this tool with the prompt.png 提示词工具 to create structured outputs from a large language model (LLM).

The tool creates a single field that contains a JSON schema. Append this field to your input dataset and pass it to downstream tools.

Tool Configuration

JSON Schema Builder

  • Title: Enter a name for the schema. Use a short, descriptive name.

  • Description: (Optional) Describe the purpose of the schema.

  • Output Column Name: Specify the name of the output column that contains the generated schema.

Schema Creation

Define 1 or more fields. Each field becomes a property in the JSON schema. Use clear, descriptive field names.

Select Build to add or remove fields. Select Preview to view the generated JSON schema.

For each field:

  • Field Name: Enter a property name.

  • Type: Select a data type:

    • String

    • Integer

    • Number

    • Boolean

    • Date

    • Datetime

    • Enum

  • Description: (Optional) Describe the field to guide downstream processing.

  • Enum Values: (Enum only) Enter 1 value per row. Select Add More to add additional values. Outputs must match 1 of these values.

  • Default Value: (Optional) Provide a default value. Input varies by type:

    • Boolean: Select True, False, or None.

    • Date or Datetime: Select a date using the calendar control or enter a value in the required format.

    • Other types: Enter a value.

  • Constraints: (Optional) Set limits based on the selected type:

    • Integer or Number: Set Minimum and Maximum values.

    • String: Set Min Length and Max Length.

    • Date or Datetime: Set Min Date and Max Date.

  • Required: Select to require this field in the output.

Select Add Field to add more fields. Select Remove to delete a field.

Tool Output

The tool outputs a single column that contains a JSON schema. By default, the column name is JSON Schema.