SQL Assistant

The SQL Assistant helps users with SQL writing in both SQL recipes and SQL notebooks.

The SQL Assistant has awareness of the tables in your database and database type in order to generate accurate SQL code across all databases.

Powered by a Large Language Model (LLM), this tool analyzes dataset schemas to craft queries tailored to your needs. Each query is accompanied by a detailed reasoning section explaining how queries are constructed.

Usage in recipes

To use this feature, you must have access to the input datasets SQL connection, and WRITE permissions to the Dataiku project where the SQL recipe resides. You can then use AI to generate SQL queries, review the generated query, and import it to your code editor, where you can modify or execute it as needed.

SQL Assistant is only supported on “regular” SQL recipes, not on Impala, Hive or Spark SparkSQL

Usage in notebooks

To use this feature, you must have WRITE permissions on the project where the SQL notebook resides. You can ask the SQL Assistant about general SQL questions but also generate queries from specified tables, refine or debug existing queries, request explanations, add comments… You can give assistant access to the tables by adding them into the context tables list. Once you add the table to the context tables, the assistant then has access to the table schema. After you’re satisfied with the generated query, you can copy the SQL, add it to the end of a query in the editor, or replace your current query in the editor and run it.

Each query has its independent chat. Each user has its own chat history.