VS Code + Rig
The easiest way to query your warehouse data in VS Code
Visual Studio Code is Microsoft's code editor, whose agent mode and GitHub Copilot Chat can connect to external tools and data over MCP.
What Rig gives VS Code
Once connected, VS Code can reason over your governed data through Rig:
- Warehouse tables and views
- Metric definitions
- Join paths
- dbt lineage
- Role-based access
- Sandbox-validated SQL
How VS Code connects to Rig
Add Rig as an MCP server in VS Code. Agent mode and Copilot Chat can then query your warehouse with governed SQL, so suggestions and generated code are grounded in your real, validated data.
Build data features with real schema in VS Code
With Rig connected, VS Code agent mode and Copilot read your actual tables, joins and metric definitions while you code. Generated SQL and components target real data rather than guessed columns.
- Generate a query for weekly active users and insert it
- Build a service that returns revenue by region
- What columns does the events table have?
Answer data questions in Copilot Chat
Copilot Chat can run ad-hoc data questions through Rig, returning validated numbers inline so you stay in the editor.
- How many signups this week?
- Show a sample of the customers table
- Find the join from accounts to subscriptions
Keep generated SQL governed and safe
Rig validates each query in a sandbox and runs read-only, so nothing the editor generates can mutate production or run away with a scan. Answers use agreed metric definitions.
- Validate this query before running it
- Recompute with the official active-user metric
- Add a limit and re-run that
Match prototypes to production reporting
Because VS Code queries the governed warehouse through Rig, the numbers in your prototype line up with the numbers the business reports.
- Mock this dashboard with live data
- Compare my metric to the official definition
- Explain how net revenue is calculated here
Frequently asked questions
- How do I connect VS Code to my warehouse?
- Add Rig as an MCP server in VS Code. Agent mode and Copilot Chat can then query your warehouse through Rig's governed context layer.
- Does this work with GitHub Copilot?
- Yes. Copilot Chat in VS Code can use Rig's MCP server to answer data questions with governed SQL.
- Is warehouse access read-only?
- Yes. Rig connects read-only and sandbox-validates each query before it runs.
- Which warehouses are supported?
- Snowflake, BigQuery, Redshift, Postgres and DuckDB/MotherDuck, plus SaaS sources synced by Rig Ingest.
Related integrations
Connect your warehouse to VS Code
Rig builds a governed context layer over your data so every team, and every AI tool, asks questions and gets answers they can trust.