Transforming Text into SQL Queries

Hello, In today’s current version there is no longer the Sql AI Agent. I would like a solution and components that I should use to pass a question in natural language, convert text to sql and access a Snowflake database.

  1. User Input, Webhook Node, or UI Form to enter their question in natural language.

  2. Conversion to SQL, HTTP Node: Calls OpenAI or the SQL conversion API. Example prompt for OpenAI:

{
"prompt": "Convert to SQL for Snowflake: 'How many products were sold yesterday?'",
"model": "gpt-4"
}
  1. Execute in Snowflake, Snowflake Node: Use the generated SQL and execute it.

  2. Response to User, Respond to Webhook Node, or notification with the result.

Documentation: