JigsawStack icon

JigsawStack

Use JigsawStack API

Actions20

Convert to SQL → Convert to SQL

AI-generated

Overview

This node converts a natural language prompt into an SQL query tailored for a specified database type. It is useful for users who want to generate SQL queries without manually writing SQL code, by simply describing the desired query in natural language. For example, a user can input a prompt like 'Find all transactions with amounts exceeding $10,000, sorted by transaction date' and get the corresponding SQL query for PostgreSQL, MySQL, or SQLite databases.

Use Case Examples

  1. Generating SQL queries from natural language prompts for data analysis.
  2. Automating SQL query creation in workflows where users are not familiar with SQL syntax.

Properties

Name Meaning
Prompt The natural language prompt that will be translated to an SQL query.
Database Type The database type to generate SQL for, such as PostgreSQL, MySQL, or SQLite.
Prompt Source Choose the source of the prompt, either directly from an SQL schema or from a file store key.
SQL Schema The database schema where the query will be run, used if the prompt source is SQL Schema.
File Store Key The key used to store the database schema on Jigsawstack fileStorage, used if the prompt source is File Store Key.
Request Options Additional request options such as batching, SSL certificate validation, proxy settings, and timeout configuration.

Output

JSON

  • sqlQuery - The generated SQL query based on the natural language prompt and database type.

Dependencies

  • JigsawStack API key credential

Troubleshooting

  • Ensure the API key credential is correctly configured and valid to avoid authentication errors.
  • Verify the natural language prompt is clear and specific enough to generate a meaningful SQL query.
  • Check the database type selection matches the target database to avoid syntax incompatibilities.
  • If using File Store Key as prompt source, ensure the key is correct and the schema is accessible in Jigsawstack fileStorage.
  • Adjust request options like timeout and batching if experiencing slow responses or rate limiting errors.

Links

Discussion