🚀 Introduction
Microsoft Fabric is revolutionizing data analytics by offering a unified platform for data engineering, data science, and business intelligence. One of its standout features is the Fabric Data Agent, which enables conversational analytics—allowing users to interact with their data using natural language queries.
In this blog, I’ll walk you through how I created a Fabric Data Agent using GitHub Copilot Agent Mode in Visual Studio Code. This approach dramatically reduces the time and effort required to build intelligent data agents.
📘 What is a Fabric Data Agent?
A Fabric Data Agent is a smart interface that connects to your data warehouse or lakehouse and allows users to:
- Ask natural language questions
- Receive AI-generated SQL queries
- Explore data relationships and insights
💸 Benefits of Using Fabric Data Agents:
- Conversational Analytics: Empower users to interact with data intuitively
- Time Efficiency: Reduce manual query writing and schema exploration
- Scalability: Easily adapt to new datasets and business needs
- Integration: Seamlessly works with Microsoft Fabric and Power BI
🧠 Why GitHub Copilot Agent Mode?
Traditionally, creating a data agent involves manually exploring schema, drafting AI instructions, and writing example queries—often taking a full day. With GitHub Copilot Agent Mode, I completed all of this in less than an hour, saving time and enabling faster iteration.
📈 Step-by-Step Workflow
1. Connect to SQL Analytics Endpoint in VS Code
- Install the MSSQL extension in VS Code
- Enable GitHub Copilot Agent Mode
- Authenticate and connect to your Fabric Lakehouse or Warehouse
2. Explore Schema and Sample Data
- Ask Copilot to read tables under the schema
- sample data from each table to understand values and relationships
3. Generate AI Instructions Automatically
- Copilot helped draft detailed AI instructions based on schema and sample data
- Instructions included table relationships, key fields, and query guidelines
4. Create Example Queries in JSON Format
- Categorized queries: Core, Leadership, Advanced, Quick Stats
- Used placeholders for dynamic filtering
- Saved as json file and imported this file into the Fabric Data Agent
📝 Final Thoughts
This approach allows developers to:
- Use VS Code as a unified interface for schema exploration, query generation, and agent creation
- Save time and improve accuracy when building data agents
If you're working with Microsoft Fabric and want to empower users with conversational analytics, this method is a game-changer. What used to be a time-consuming manual process can now be done in minutes, making it ideal for agile teams and fast-paced development environments.
👉 Bonus Tip: If you prefer working in notebooks or want to automate agent creation further, you can also use the Fabric SDK to create and publish and evaulate agents programmatically.
Would love to hear your thoughts or improvements on this workflow. Happy building!