Before using this integrated tool, you must understand what data is shared with GitHub. Shared data includes contextual information about the code and files being edited (“prompts”) and details about user actions (“user engagement data”). Please review GitHub Copilot’s privacy statement to learn about the data they collect. You must also consider the security implications of involving third-party services, as you are responsible for ensuring compliance with your organization’s data governance policies. Adobe is not responsible for any data-related concerns or issues that may arise from the use of this tool. Consult the GitHub’s documentation for more information.
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.
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 Platform UI. Read the credentials guide to learn how to find these values in the Platform UI. Please contact your organization administrator if you do not currently have access to the Queries workspace.
The following Visual Studio Code extensions are required to effectively manage and query your Platform SQL databases directly within the code editor. Download and install these extensions.
The next extensions enable GitHub Copilot and its chat features.
Select the cylinder icon () in the left navigation of VS Code, followed by Add New Connection or the cylinder plus icon (
).
The Connection Assistant appears. Select the PostgreSQL database driver.
The Connection Settings view appears. Enter your Platform connection credentials into the appropriate fields of the SQLTools Connection Assistant. The required values are explained in the table below.
Property | Description |
---|---|
Connection name | 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:
|
Connect using | Use the Server and Port option to specify the server’s address (hostname) and the port number to establish a direct connection to Platform |
Server address | Enter the Host value provided in your Platform Postgres credentials, such as acmeprod.platform-query.adobe.io . |
Port | This value is typically 80 for Platform services. |
Database | Enter the Database value provided in your Platform Postgres credentials, such as prod:all . |
Username | This property refers to your organization ID. Enter the Username value provided in your Platform Postgres credentials. |
Password | This property is your access token. Enter the Password value provided in your Platform Postgres credentials. |
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 entered all your credentials, you can test your connection before saving the connection. Scroll down to the bottom of the workspace and select Test Connection.
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.
Once connected to your 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.
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 () appears in your status bar (if there is an issue, the Copilot error icon displays instead). Select the Copilot icon to open the GitHub Copilot Menu. From the GitHub Copilot Menu, select Edit Settings
Scroll down the options and ensure the check box is enabled for the Enable Auto Completions setting.
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.
If you would like to disable Copilot for a specific file or language, select the icon in the status bar and disable it.
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.
If you are not getting suggestions, ensure that Copilot is enabled in your file’s language.
To cycle through alternative code suggestions, select the arrows in the Copilot dialog.
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.
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 () in the VS Code sidebar to open a dedicated chat window.
You can also access chat history by selecting the history icon () at the top of the chat panel.
You are now ready to efficiently query your 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.