Skip to content

Commit 8f7eace

Browse files
committed
Update copilot page
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
1 parent 009ab41 commit 8f7eace

File tree

11 files changed

+44
-31
lines changed

11 files changed

+44
-31
lines changed
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/content/docs/extensions/db2i/AI/Copilot/index.mdx

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,6 @@ title: Specific usage
44
import { Aside, CardGrid, Card, LinkCard, Steps, Badge } from '@astrojs/starlight/components';
55
import { Image } from 'astro:assets';
66

7-
## Getting Started: Github Copilot
8-
9-
![alt text](../Copilot/image.png)
10-
11-
You can use GitHub Copilot, with the `@db2i` chat participant, to ask questions either about Db2 for IBM i or about specific tables in the current schema of the selected job. You can ask things like:
12-
13-
```text
14-
@db2i What columns make up an employee?
15-
```
16-
17-
```text
18-
@db2i Can you get the department name for each employee?
19-
```
20-
21-
```text
22-
@db2i Write a select statement to count how many employees are in each department
23-
```
24-
257
### Install the GitHub Copilot extension
268

279
<Steps>
@@ -42,27 +24,58 @@ You can use GitHub Copilot, with the `@db2i` chat participant, to ask questions
4224

4325
Once GitHub Copilot is installed, you can ask questions about your database using the `@db2i` chat participant. Here are some examples:
4426

27+
<CardGrid><Card>
4528

46-
**Example 1** Summarize the columns in the `EMPLOYEE` table
29+
**Example 1**: Summarize the columns in the `EMPLOYEE` table
4730

4831
This is a simple example to show how you can ask questions about the structure of your database. You can ask the chat participant to summarize the columns in a table.
4932

50-
![alt text](image-2.png)
33+
</Card><Card>
5134

52-
**Example 2:** Get the department name for each employee
35+
![alt text](references.png)
5336

54-
This example shows how you can ask the chat participant to write a query that joins two tables to get the department name for each employee. The chat participant will generate the SQL query for you that you can run directly in your SQL editor in VS Code.
37+
</Card></CardGrid>
5538

56-
![alt text](image-4.png)
39+
<CardGrid><Card>
5740

58-
Run the Generated SQL to get the result:
59-
![alt text](image-5.png)
41+
**Example 2:** Ask to find out what objects are related to `employee`?
6042

61-
<Aside type="tip">
62-
You can set the current schema by running the `SET SCHEMA` command in the SQL script editor.
63-
</Aside>
43+
This example shows how you can ask the chat participant to find out what objects are related to the `employee` table. The chat participant will return a list of related objects, including the `department` table.
44+
45+
It will tell you if it can't get the related objects or if there are none.
46+
47+
</Card><Card>
48+
49+
![alt text](related.png)
50+
51+
</Card></CardGrid>
52+
53+
<CardGrid><Card>
54+
55+
**Example 3:** Try out a follow up question.
56+
57+
The screenshots that after the participant has responsed, it will sometimes offer some additional follow up questions. Simply clicking on one of these will ask the question to the chat participant.
58+
59+
</Card><Card>
60+
61+
![alt text](followup.png)
62+
63+
</Card></CardGrid>
64+
65+
---
66+
67+
**Example 4**: Using our 'Run SQL statement' tool to summarize information.
68+
69+
This example shows how you can use the `Run SQL statement` tool to ask information about the data in your system. Before the tool will run any SQL statement, it will ask you to confirm that you want to run the SQL statement. This is a safety feature to prevent you from running SQL statements that could modify your data.
70+
71+
<CardGrid><Card>
72+
73+
![alt text](toolA.png)
74+
75+
</Card><Card>
76+
77+
It will then take the result set of the statement and summarize the information based on your request.
6478

65-
**Example 3:** Calculate the Average salary for each department
79+
![alt text](toolB.png)
6680

67-
A slightly more complex example that shows how you can ask the chat participant to write a query that calculates the average salary for each department.
68-
![alt text](image-11.png)
81+
</Card></CardGrid>
Loading
Loading
Loading

0 commit comments

Comments
 (0)