HomeGuidesAnnouncementsCommunity
Guides

SQL Runner

The SQL Runner component allows you to execute SQL queries against selected database connections within your skill.

Basic Setup

  1. Add the SQL Runner component to your skill
  2. Navigate to Inputs/Outputs
  3. Select your target database connection

Writing Queries

Access the Customize tab to write or paste your SQL queries. The syntax varies by data source:

Data Source Examples

  • Standard Database: SELECT * FROM table_name
  • Parquet Files: SELECT * FROM read_parquet.table_name
  • CSV Files: SELECT * FROM read_csv.table_name

Finding Table Names

  1. Navigate to the database connection
  2. Select "Add New Table"
  3. View list of available tables for the connection

Testing and Preview

  1. Run the node to execute your query
  2. View results using:
    • Preview tab
    • Output area's preview icon in Inputs/Outputs section

Integration Options

  • Feed data to visualization components
  • Use alongside other nodes for complex operations
  • Include in skill responses

Example Query

SELECT 
    AVG(price) as avg_price,
    MIN(price) as min_price,
    MAX(price) as max_price,
    brand,
    category
FROM your_table
GROUP BY brand, category
ORDER BY brand, category

Best Practices

  • Test queries before integration
  • Verify data output format
  • Consider query performance
  • Use appropriate table references based on data source type
  • Validate results in preview before connecting to other components

The SQL Runner node serves as a powerful tool for data extraction and manipulation within your skills, providing flexible database connectivity and query capabilities.