Connect GitHub Copilot and Visual Studio Code to Query Service
- Topics:
- Queries
CREATED FOR:
- User
- Developer
GitHub Copilot, powered by OpenAI Codex, is an AI-driven tool that enhances your coding experience by suggesting code snippets and entire functions directly within your editor. Integrated with Visual Studio Code (VS Code), Copilot can significantly accelerate your workflow, especially when working with complex queries. Follow this guide to learn how to connect GitHub Copilot and VS Code to the Query Service to write and manage your queries with greater efficiency. For more information on Copilot, visit GitHub’s Copilot product page and the official Copilot documentation.
This document covers the steps required to connect GitHub Copilot and VS Code with Adobe Experience Platform Query Service.
Get started
This guide requires that you already have access to a GitHub account and have signed up for GitHub Copilot. You can sign up from the GitHub website. You also need VS Code. You can download VS Code from their official website.
Once you have installed VS Code and activated your Copilot subscription, acquire your connection credentials for Experience Platform. These credentials are located in the Credentials tab of the Queries workspace in the Experience Platform UI. Read the credentials guide to learn how to find these values in the Experience Platform UI. Please contact your organization administrator if you do not currently have access to the Queries workspace.
Required Visual Studio Code extensions
The following Visual Studio Code extensions are required to effectively manage and query your Experience Platform SQL databases directly within the code editor. Download and install these extensions.
- SQLTools: Use the SQLTools extension to manage and query multiple SQL databases. It includes features like a query runner, SQL formatter, and connection explorer, with support for additional drivers to boost developer productivity. Read the overview on Visual Studio Marketplace for more details.
- SQLTools PostgreSQL/Cockroach Driver: This extension enables you to connect, query, and manage PostgreSQL and CockroachDB databases directly within your code editor.
The next extensions enable GitHub Copilot and its chat features.
- GitHub Copilot: Provides inline coding suggestions as you type.
- GitHub Copilot Chat: A companion extension that provides conversational AI assistance.
Create connection
Select the cylinder icon (
The Connection Assistant appears. Select the PostgreSQL database driver.
Input connection settings
The Connection Settings view appears. Enter your Experience Platform connection credentials into the appropriate fields of the SQLTools Connection Assistant. The required values are explained in the table below.
Provide a “Connection name” like Prod_MySQL_Server
that is descriptive and clearly indicates its purpose (for example, a production environment for a MySQL server). Best practices include:
- Following your organization’s naming conventions to ensure that it is unique within the system.
- Keep it concise to maintain clarity and avoid confusion with other connections.
- Include relevant details about the connection’s function or environment in the name.
acmeprod.platform-query.adobe.io
.80
for Experience Platform services.prod:all
.
Next, select Use Password, followed by Save as plaintext in settings from the dropdown menu that appears. The Password field appears. Use this text input field to enter your access token.
Finally, to enable SSL, select the SSL input field and choose Enabled from the dropdown menu that appears.

Once you have correctly input your connection details, select Save Connection to confirm your settings.
The Review connection details view appears and displays your connection credentials. When you are sure that your connection details are accurate, select Connect Now.
Your VS Code workspace appears with a suggestion from GitHub Copilot.
GitHub Copilot quick guide
Once connected to your Experience Platform instance, you can use Copilot as an AI coding assistant to help you write code faster and with more confidence. This section covers its key features and how to use them.
Getting started with GitHub Copilot
First, ensure that you have the latest version of VS Code installed. An outdated VS Code version can prevent key Copilot features from working as intended. Next, ensure that the Enable Auto Completions setting is enabled. If Copilot is running correctly, the Copilot icon (
Scroll down the options and ensure the check box is enabled for the Enable Auto Completions setting.
Code completions
Once you install the GitHub Copilot extension and log in, it automatically activates a feature called Ghost Text, which suggests code completions as you type. These suggestions help you write code more efficiently and with fewer interruptions. You can also use comments to guide the AI code suggestions. This means that non-technical users can convert plain speech into code to explore their data.
Accept full or partial Ghost Text suggestions
When GitHub Copilot suggests code completions, you can accept either partial or complete suggestions. Select Tab to accept the entire suggestion, or hold down Control (or Command on Mac) and press the right arrow to accept partial text. To dismiss a suggestion, press Escape.
Alternative suggestions
To cycle through alternative code suggestions, select the arrows in the Copilot dialog.
Use inline chat
You can also chat with Copilot directly about your code. Use Control (or Command) + I to trigger the inline chat dialog. This feature is used for iterating on your code and refining suggestions in context. You can highlight a block of code and use inline chat to see a different solution proposed by the AI before accepting.
Dedicated chat view
You can use a more traditional chat interface with a dedicated chat sidebar to form ideas and strategy, solve coding issues, and discuss implementation details. Select the chat icon (
You can also access chat history by selecting the history icon (
Next steps
You are now ready to efficiently query your Experience Platform databases directly from your code editor, and use GitHub Copilot’s AI-powered code suggestions to streamline writing and optimizing SQL queries. For more information on how to write and run queries, refer to the guidance for query execution.