---
title: "VS Code + Rig: Query Your Warehouse Data in VS Code"
description: "Connect your warehouse to VS Code with Rig. Ask data questions in plain English and get governed, validated SQL answers. Snowflake, BigQuery, Redshift, Postgres and more."
canonical: "https://rig.so/integrations/vs-code"
format: markdown
---

Browse integrations

![VS Code logo](https://img.logo.dev/visualstudio.com?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=112&format=png&retina=true)

AI tools Supported

# 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.

[Try Rig](https://app.rig.so/signup)[Book a demo](https://rig.so/book-demo)

## 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.

[Read the step-by-step guide to connecting Rig to VS Code](https://rig.so/guides/connect-ai-tools)

## 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.

Ask Rig

- 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.

Ask Rig

- 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.

Ask Rig

- 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.

Ask Rig

- 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

[![ChatGPT logo](https://img.logo.dev/openai.com?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=72&format=png&retina=true)ChatGPTAsk your warehouse questions in ChatGPT and get governed, validated answers.](https://rig.so/integrations/chatgpt)[![Claude logo](https://img.logo.dev/claude.ai?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=72&format=png&retina=true)ClaudeAsk questions of your warehouse in Claude, with governed SQL behind every answer.](https://rig.so/integrations/claude)[![Claude Code logo](https://img.logo.dev/claude.com?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=72&format=png&retina=true)Claude CodeQuery and build with warehouse data from the Claude Code terminal.](https://rig.so/integrations/claude-code)[![Cursor logo](https://img.logo.dev/cursor.com?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=72&format=png&retina=true)CursorBring governed warehouse data into Cursor for data-aware coding.](https://rig.so/integrations/cursor)[![Google Gemini logo](https://img.logo.dev/gemini.google.com?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=72&format=png&retina=true)Google GeminiQuery your warehouse from Gemini and the Gemini CLI with governed SQL.](https://rig.so/integrations/gemini)[![OpenAI Codex logo](https://img.logo.dev/openai.com?token=pk_AdkTbLWDS1iunmvTK2qm1g&size=72&format=png&retina=true)OpenAI CodexGive Codex governed access to your warehouse for data-aware coding.](https://rig.so/integrations/codex)

## 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.

[Try Rig](https://app.rig.so/signup)[Book a demo](https://rig.so/book-demo)

---

- [This page as HTML](https://rig.so/integrations/vs-code)
- [Site map for language models](https://rig.so/llms.txt)
- [API and agent documentation](https://rig.so/developers)
