Creating a Query
Nekt makes it simple to write, test, and save queries from the SQL Explorer. Whether you’re writing simple filters or complex multi-table joins, the interface provides all the tools you need to build and validate your SQL code.Step 1: Access the SQL Explorer
You can access the SQL Explorer in two ways:- Navigate to the Explorer page in Nekt.
- Go to Queries > Add Query > SQL
Step 2: Build Your SQL Query
You have two options for building your query:-
Write SQL Manually:
- Use the SQL editor to write your query from scratch
- Leverage auto-completion and syntax highlighting
- Access table schemas and column information directly in the interface
-
Use AI Assistance:
- Describe what you want to achieve in natural language
- Let our AI help you generate the appropriate SQL query
- Review and modify the generated query as needed
- Start with simple queries and build complexity gradually
- Test your query results before creating a transformation
- Use the query history to reference and modify previous queries
Step 3: Save as a Query
Once your SQL is working as expected:- Click the Save as Query button in the Explorer
- Configure the query settings:
- Set a name and description
- Choose when the query should run
- Configure any necessary parameters
- Save the query to make it available for execution
- Edit the SQL directly
- Modify the schedule and settings
- Monitor execution history and performance
Best Practices
-
Query Optimization:
- Use appropriate indexes and joins
- Limit the data processed to only what’s necessary
- Consider query performance and resource usage
-
Maintainability:
- Use clear, descriptive names for queries
- Document complex SQL with comments
- Break down complex logic into smaller, manageable queries
-
Testing:
- Always test queries with sample data first
- Verify results match your expectations
- Check for edge cases and data quality issues
-
Monitoring:
- Review query execution logs
- Monitor query performance
- Set up alerts for failed queries
Need Help?
If you need assistance with SQL queries, our team is here to help. You can:- Use the AI assistant in the Explorer for query generation and debugging
- Contact our support team for additional guidance