SQL generation
Select a SQL editor surface (for example, a transform or warehouse query node) and open Ask Copilot. Describe the result shape you need:- Target columns and types
- Join keys across tables or stages
- Filters (
last 7 days,active customers only) - Dialect-specific functions (Snowflake, BigQuery, Redshift, etc.)
Optimization suggestions
Ask Copilot to optimize a query you already wrote. Typical suggestions include:- Pushing filters closer to scans
- Replacing correlated subqueries with joins or window functions where appropriate
- Pruning unused columns before expensive joins
- Adding clustering or partition predicates your tables support
- Cost-focused
- Latency-focused
- Correctness-first
Request “lower bytes scanned” or “reduce spill to disk” when your profile shows large scans.
Error explanation
Paste compiler or runtime errors into chat (redact internal hostnames if policy requires). Copilot maps common messages to fixes:- Type mismatches in
JOINorUNION - Missing aliases in nested selects
- Invalid identifier quoting per dialect
- Permission errors surfaced as SQL exceptions
Sample data
Sample data
If you paste sample rows, mask direct identifiers. Prefer synthetic values that preserve shape but not real customer data.
Large scripts
Large scripts
For long scripts, point Copilot to the failing stanza only; smaller snippets get more accurate line-level guidance.
Guardrails
You remain accountable for access controls and row-level security. Copilot does not bypass database grants. Generated SQL that references restricted objects still fails at execution until credentials allow access.Related topics
AI Copilot overview
Feature gating and API key models.
Pipelines
Where SQL nodes fit in the broader canvas.