Bytebase sends the following info to the configured OpenAI endpoint:
  • Tables and column names of the current database schema.
Here is a video demoing this feature:

Setup

Enable AI Assistant. Afterward, an OpenAI icon will appear on the SQL Editor. Clicking the icon will toggle the AI Assistant sidebar. sql-editor-text-to-sql

Text2SQL

Use natural language to compose SQL and execute. sql-editor-text-to-sql

Explain SQL

For complex statements like stored procedures, you can ask AI Assistant to explain. explain-sql

Find problem

AI Assistant can spot SQL problems. find-problem