natural_language_to_sql
Transform natural language questions into SQL queries with AI, enabling users to interact with Snowflake databases efficiently. Simplify data querying by converting user input into structured database commands.
Instructions
Convert natural language question to SQL query using AI
Input Schema
Name | Required | Description | Default |
---|---|---|---|
request | Yes |
Input Schema (JSON Schema)
{
"$defs": {
"NaturalLanguageRequest": {
"description": "Request for natural language to SQL conversion",
"properties": {
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Additional context about tables/schema",
"title": "Context"
},
"database": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Database to query",
"title": "Database"
},
"question": {
"description": "Natural language question about the data",
"title": "Question",
"type": "string"
},
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Schema to query",
"title": "Schema"
}
},
"required": [
"question"
],
"title": "NaturalLanguageRequest",
"type": "object"
}
},
"properties": {
"request": {
"$ref": "#/$defs/NaturalLanguageRequest",
"title": "Request"
}
},
"required": [
"request"
],
"type": "object"
}