Prerequisites
- A ClickHouse server or cloud instance
- User credentials with appropriate access
- Server host and port information
- SSL certificates (if using secure connection)
Connection setup
- From your Basedash dashboard, click “Add Data Source”
- Select “ClickHouse” as your data warehouse
- Enter your connection details:
- Host
- Port (default: 8123 for HTTP, 9440 for HTTPS)
- Database name
- Username
- Password
- SSL settings (if required)
- Click “Test Connection” to verify
- Save your connection
Required permissions
Your ClickHouse user needs:SELECT
privilege on required databases/tablesSHOW
privilege on databasesSHOW TABLES
privilegeSHOW COLUMNS
privilege
Best practices
- Create a dedicated user for Basedash
- Enable SSL for secure connections
- Grant minimum required permissions
- Set appropriate query limits
- Regularly rotate credentials
Performance optimization
- Use appropriate table engines
- Configure proper partitioning
- Set up materialized views
- Monitor query performance
- Use efficient indexing
- Enable query caching
Troubleshooting
- Verify user permissions
- Check server connectivity
- Monitor resource usage
- Review server logs
- Validate query syntax
- Check SSL configuration
Next steps: Add custom context
You can add custom context to help the AI better understand your data structure and business logic. Consider adding context at the database or schema level if you notice the AI struggling to locate or understand specific data.When to add context
- Complex analytics data: When the AI needs help understanding data structure and metrics
- Business-specific metrics: If calculated fields or KPIs need additional explanation
- Unclear naming conventions: When table or column names don’t clearly indicate their purpose