GENERATE SQL Syntax
Parameters
<question>
<question>
Natural-language question for which an equivalent SQL query will be generated
<schema name>
<schema name>
Name of the schema containing the context to use in generating
the query
WITH OPTIONS
WITH OPTIONS
Optional indicator that a comma-delimited list of SQL generation option/value assignments will
follow.See SQL Generation Options for the complete list of options.
SQL Generation Options
The following options can be specified to modify the way SQL queries are generated.ai_api_provider
ai_api_provider
Name of an LLM service to use other than the default one; the default,
sqlgpt, uses the
Kinetica SQLGPT.io service.ai_api_url
ai_api_url
URL of an LLM service to use other than the default one.
context_name
context_name
Name of the SQL-GPT context to use as a basis for generating SQL queries; should be of the
form
[<schema name>.]<context name>.context_names
context_names
Comma-separated list of names of SQL-GPT contexts to use as a basis for generating SQL
queries; each should be of the form
[<schema name>.]<context name>, and the entire list
should be single-quoted.For example:use_rag
use_rag
Whether to use retrieval-augmented generation (RAG) facilities
with the given SQL-GPT contexts when processing this request.
SQL Generation Examples
To generate the SQL equivalent query to a given question using theexample.atc_ctx SQL-GPT context:
GENERATE SQL Example
nyctaxi_ctx & flights_ctx SQL-GPT contexts with SQL RAG:
GENERATE SQL with RAG Example