SQL Runner
The SQL Runner component allows you to execute SQL queries against selected database connections within your skill.
Basic Setup
- Add the SQL Runner component to your skill
- Navigate to Inputs/Outputs
- 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
- Navigate to the database connection
- Select "Add New Table"
- View list of available tables for the connection
Testing and Preview
- Run the node to execute your query
- 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.
Updated 8 days ago