You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/design-implement-sql-solutions-ai-assisted-tools/includes/2-describe-ai-assisted-development-tools.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,19 @@ AI-assisted development tools are transforming how database professionals work w
2
2
3
3
## What are AI-assisted development tools?
4
4
5
-
AI-assisted development tools use large language models (LLMs) to help you write, understand, and optimize code. These tools analyze your code context, database schema, and natural language prompts to generate relevant suggestions. For database development on SQL platforms, two primary AI assistants are available:
5
+
AI-assisted development tools use large language models (LLMs) to help you write, understand, and optimize code. AI-assisted tools analyze your code context, database schema, and natural language prompts to generate relevant suggestions. For database development on SQL platforms, two primary AI assistants are available:
6
6
7
7
-**GitHub Copilot** works directly in your development environment—whether that's Visual Studio Code, Visual Studio, or SQL Server Management Studio (SSMS). It provides code completions, answers questions about your database, and helps you write T-SQL queries by understanding your schema and the patterns you use.
8
8
9
9
-**Fabric Copilot** is integrated into Microsoft Fabric workspaces and provides AI assistance for data engineering, data science, and analytics workloads. When working with SQL databases in Fabric, Copilot can help you explore data, generate queries, and understand your lakehouse structures.
10
10
11
-
## How these tools enhance database development
11
+
## How GitHub Copilot and Fabric Copilot enhance database development
12
12
13
13
Consider a scenario where you need to write a complex query joining multiple tables with specific filtering conditions. Traditionally, you might spend time reviewing table schemas, checking column names and data types, and testing different query approaches. With AI-assisted tools, you can describe what you need in natural language, and the assistant generates a starting query based on your actual database schema.
14
14
15
-
These tools provide several key capabilities:
15
+
:::image type="content" source="../media/workflow.png" alt-text="Diagram showing the Copilot workflow: write prompt or code, context sent to AI, AI generates suggestion, review and accept.":::
16
+
17
+
GitHub Copilot and Fabric Copilot provide several key capabilities:
16
18
17
19
-**Code completion**: As you type T-SQL, the assistant suggests complete statements, column names, and table references based on your connected database
18
20
-**Natural language to SQL**: Describe what you want to retrieve or modify, and the assistant generates the corresponding T-SQL code
@@ -43,4 +45,4 @@ When using AI-assisted tools for database development, you're working with syste
43
45
> [!IMPORTANT]
44
46
> AI-generated code suggestions should always be reviewed before execution, especially for queries that modify data or affect database security. The assistant provides helpful starting points, but you remain responsible for validating that generated code meets your requirements and follows your organization's standards.
45
47
46
-
Understanding these AI-assisted development tools prepares you to make informed decisions about enabling and configuring them for your database development workflows. The following units guide you through the security considerations, setup process, and advanced configuration options that help you get the most value from these tools.
48
+
Understanding GitHub Copilot and Fabric Copilot prepares you to make informed decisions about enabling and configuring them for your database development workflows. The following units guide you through the security considerations, setup process, and advanced configuration options that help you get the most value from AI-assisted development.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/design-implement-sql-solutions-ai-assisted-tools/includes/3-interpret-security-impact.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Before enabling AI-assisted tools in your database development environment, you need to understand the security implications. These tools process code, database schemas, and potentially sensitive data patterns, making security awareness essential for responsible adoption.
1
+
Before enabling AI-assisted tools in your database development environment, you need to understand the security implications. GitHub Copilot and Fabric Copilot process code, database schemas, and potentially sensitive data patterns, making security awareness essential for responsible adoption.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/design-implement-sql-solutions-ai-assisted-tools/includes/4-enable-github-copilot-fabric-copilot.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ SQL Server Management Studio (SSMS) 22 and later versions include native support
25
25
26
26
After installation, you'll see a GitHub Copilot status icon in the upper-right corner of SSMS. The icon indicates whether Copilot is active, inactive, unavailable, or not installed.
27
27
28
+
:::image type="content" source="../media/sign-in.png" alt-text="Screenshot showing the GitHub Copilot badge options in SSMS.":::
29
+
28
30
To sign in and activate Copilot:
29
31
30
32
1. Select the GitHub Copilot badge in SSMS
@@ -45,6 +47,8 @@ Visual Studio Code provides a flexible environment for database development with
45
47
4. Search for and install the **GitHub Copilot Chat** extension
46
48
5. Sign in to your GitHub account when prompted
47
49
50
+
:::image type="content" source="../media/github-copilot-extension-vscode.png" alt-text="Screenshot showing the GitHub Copilot extension in Visual Studio Code.":::
51
+
48
52
For SQL database development, you'll also want the MSSQL extension:
49
53
50
54
1. In the Extensions view, search for `mssql`
@@ -53,6 +57,8 @@ For SQL database development, you'll also want the MSSQL extension:
53
57
54
58
With both Copilot and MSSQL extensions installed, you can start conversations about your database directly in the Copilot Chat panel. Right-click on a connected database and select **Chat with this database** to begin a context-aware conversation.
55
59
60
+
:::image type="content" source="../media/vscode-chat-database-context-menu.png" alt-text="Screenshot showing the database context menu with the Chat with this database option.":::
61
+
56
62
## Enable Fabric Copilot
57
63
58
64
Fabric Copilot is available within Microsoft Fabric workspaces when your organization meets the licensing requirements. Enabling Copilot involves both tenant-level and workspace-level settings.
@@ -114,4 +120,4 @@ After enabling AI-assisted tools, verify everything is working correctly:
114
120
> [!NOTE]
115
121
> If Copilot isn't providing contextual suggestions, verify your database connection is active and that your account has the necessary permissions to query schema information.
116
122
117
-
With GitHub Copilot and Fabric Copilot enabled, you're ready to explore advanced configuration options that customize how these tools behave for your specific workflows.
123
+
With GitHub Copilot and Fabric Copilot enabled, you're ready to explore advanced configuration options that customize how the AI assistants behave for your specific workflows.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/design-implement-sql-solutions-ai-assisted-tools/includes/5-configure-model-mcp-tool-options.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,10 @@ Model Context Protocol (MCP) is an open standard that allows AI assistants to co
30
30
31
31
With MCP configured, when you ask "What columns are in the Customers table?", the assistant can query your database directly rather than relying on whatever code context is visible in your editor. This produces more accurate and reliable suggestions.
32
32
33
+
:::image type="content" source="../media/data_flow.png" alt-text="Diagram showing Model Context Protocol architecture with GitHub Copilot as the MCP Host connecting through an MCP Client to an MCP Server that accesses a SQL Database.":::
34
+
33
35
MCP follows a client-server architecture:
36
+
34
37
-**MCP Host**: Your AI environment (GitHub Copilot, Claude, etc.)
35
38
-**MCP Client**: The protocol client that connects to MCP servers
36
39
-**MCP Server**: A service that exposes specific data sources or tools
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/design-implement-sql-solutions-ai-assisted-tools/includes/6-create-configure-copilot-instruction-files.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,13 @@ Custom instruction files provide a way to guide GitHub Copilot's behavior consis
4
4
5
5
Custom instruction files are markdown documents that contain guidance for GitHub Copilot. When you place these files in specific locations, Copilot includes their contents as context when generating suggestions. This means you can influence how Copilot responds without modifying each prompt.
6
6
7
+
:::image type="content" source="../media/structure.png" alt-text="Diagram showing a repository folder structure with a .github folder containing copilot-instructions.md and a prompts subfolder with .prompt.md files.":::
8
+
7
9
There are two main types of instruction files:
8
10
9
-
**Repository instructions** (`copilot-instructions.md`): Apply to everyone working in a specific repository. Stored in the `.github` folder at the repository root.
11
+
-**Repository instructions** (`copilot-instructions.md`): Apply to everyone working in a specific repository. Stored in the `.github` folder at the repository root.
10
12
11
-
**Prompt files** (`.prompt.md`): Reusable prompts for specific tasks or scenarios. Stored in the `.github/prompts` folder and can be referenced in chat conversations.
13
+
-**Prompt files** (`.prompt.md`): Reusable prompts for specific tasks or scenarios. Stored in the `.github/prompts` folder and can be referenced in chat conversations.
12
14
13
15
## Create a repository instruction file
14
16
@@ -111,17 +113,19 @@ To use this prompt in VS Code, reference it in the chat panel with the `#` symbo
111
113
112
114
For enterprise teams, consider these approaches to instruction file management:
113
115
114
-
**Centralized standards**: Maintain a master instruction file in a shared repository that gets copied or linked to project repositories.
116
+
-**Centralized standards**: Maintain a master instruction file in a shared repository that gets copied or linked to project repositories.
115
117
116
-
**Layered instructions**: Use organization-level instructions for general standards, with repository-specific additions for project requirements.
118
+
-**Layered instructions**: Use organization-level instructions for general standards, with repository-specific additions for project requirements.
117
119
118
-
**Version control**: Track instruction file changes in git so you can review how your AI guidance evolves over time.
120
+
-**Version control**: Track instruction file changes in git so you can review how your AI guidance evolves over time.
119
121
120
122
> [!TIP]
121
123
> Review your instruction files periodically. As your team's practices evolve or as Copilot improves, you might need to adjust your guidance.
122
124
123
125
## Best practices for instruction files
124
126
127
+
To get the most out of custom instruction files, follow these best practices:
128
+
125
129
**Be specific**: Vague instructions produce vague results. Instead of "use good naming," specify your exact naming pattern.
126
130
127
131
**Provide examples**: Show Copilot what you want rather than just describing it. Include code snippets that demonstrate your preferred patterns.
0 commit comments