VOOZH about

URL: https://www.cdata.com/kb/tech/azuredatalake-cloud-zed-editor.rst

⇱ Query Live Azure Data Lake Storage Data in Zed Editor via CData Connect AI


Query Live Azure Data Lake Storage Data in Zed Editor via CData Connect AI

πŸ‘ Yazhini G
Yazhini G
Technical Marketing Engineer
Leverage the CData Connect AI Remote MCP Server to enable Zed Editor to securely access and query live Azure Data Lake Storage data directly from the development environment.

Zed is a high-performance, open-source code editor built for speed and collaboration. Its built-in AI agent panel supports LLM-powered interactions and MCP (Model Context Protocol) tool integrations, enabling developers to access live external data sources directly within the editor.

By integrating Zed with CData Connect AI through the built-in MCP (Model Context Protocol) Server, the Zed AI agent gains governed, real-time access to live Azure Data Lake Storage data. This enables developers to query schemas, retrieve records, and explore Azure Data Lake Storage data without leaving the editor or writing custom integration code.

This article explains how to configure Azure Data Lake Storage connectivity in Connect AI, register the CData MCP Server in Zed, and query live Azure Data Lake Storage data from the Zed agent panel.

Step 1: Configure Azure Data Lake Storage connectivity for Zed

Connectivity to Azure Data Lake Storage from Zed is made possible through CData Connect AI's Remote MCP Server. To interact with Azure Data Lake Storage data from Zed, start by creating and configuring a Azure Data Lake Storage connection in CData Connect AI.

  1. Log into Connect AI, click Sources, and then click Add Connection
  2. πŸ‘ Adding a connection in Connect AI
  3. Select Azure Data Lake Storage from the Add Connection panel
  4. πŸ‘ Selecting data source
  5. Enter the necessary authentication properties to connect to Azure Data Lake Storage.

    Authenticating to a Gen 1 DataLakeStore Account

    Gen 1 uses OAuth 2.0 in Entra ID (formerly Azure AD) for authentication.

    For this, an Active Directory web application is required. You can create one as follows:

    1. Sign in to your Azure Account through the
    2. Select "Entra ID" (formerly Azure AD).
    3. Select "App registrations".
    4. Select "New application registration".
    5. Provide a name and URL for the application. Select Web app for the type of application you want to create.
    6. Select "Required permissions" and change the required permissions for this app. At a minimum, "Azure Data Lake" and "Windows Azure Service Management API" are required.
    7. Select "Key" and generate a new key. Add a description, a duration, and take note of the generated key. You won't be able to see it again.

    To authenticate against a Gen 1 DataLakeStore account, the following properties are required:

    • Schema: Set this to ADLSGen1.
    • Account: Set this to the name of the account.
    • OAuthClientId: Set this to the application Id of the app you created.
    • OAuthClientSecret: Set this to the key generated for the app you created.
    • TenantId: Set this to the tenant Id. See the property for more information on how to acquire this.
    • Directory: Set this to the path which will be used to store the replicated file. If not specified, the root directory will be used.

    Authenticating to a Gen 2 DataLakeStore Account

    To authenticate against a Gen 2 DataLakeStore account, the following properties are required:

    • Schema: Set this to ADLSGen2.
    • Account: Set this to the name of the account.
    • FileSystem: Set this to the file system which will be used for this account.
    • AccessKey: Set this to the access key which will be used to authenticate the calls to the API. See the property for more information on how to acquire this.
    • Directory: Set this to the path which will be used to store the replicated file. If not specified, the root directory will be used.
    πŸ‘ Configuring a connection (Salesforce is shown)
  6. Click Save & Test
  7. Navigate to the Permissions tab and update user-based permissions
  8. πŸ‘ Updating permissions

Add a Personal Access Token

A Personal Access Token (PAT) is used to authenticate the connection to Connect AI from Zed. It is best practice to create a separate PAT for each integration to maintain granular access control.

  1. Click the gear icon () at the top right of the Connect AI app to open Settings
  2. On the Settings page, go to the Access Tokens section and click Create PAT
  3. Give the PAT a descriptive name and click Create
  4. πŸ‘ Creating a new PAT
  5. Copy the token when displayed and store it securely. It will not be shown again

With the Azure Data Lake Storage connection configured and a PAT generated, Zed can now connect to Azure Data Lake Storage data through Connect AI.

Step 2: Configure Connect AI in Zed

Now, let's register the CData Connect AI MCP endpoint in Zed so that the built-in AI agent can discover and call live data tools.

  1. Download and install Zed
  2. Open the agent panel by pressing Ctrl + Shift + /, or by clicking the sparkle icon at the bottom right of the editor
  3. In the agent panel, click the ... (toggle agent menu) and select Add Custom Server from the dropdown πŸ‘ Opening the agent menu to add a custom MCP server
  4. Select the Configure Remote option to configure CData's MCP
  5. An Add MCP Server dialog opens displaying a remote server configuration template. Replace the placeholder content with the following JSON:
    {
     "cdata": {
     "url": "https://mcp.cloud.cdata.com/mcp",
     "headers": {
     "Authorization": "Basic your_base64_encoded_email_PAT"
     }
     }
    }
     

    Note: Combine your Connect AI email and PAT in the format email:PAT, Base64 encode the combined string, and prefix it with Basic. For example, given [email protected]:ABC123...XYZ, the header value becomes something like: Basic dXNlckBteWRvbWFpbjphSzkvbVB4Mi9Rcjd2TjQ...

    πŸ‘ Pasting the CData Connect AI MCP Server configuration
  6. Click Add Server or press Ctrl + Enter to register the MCP server

Configure an LLM provider

Zed requires at least one LLM provider to power the agent's reasoning. Configure a provider so the agent can interpret queries and call MCP tools through Connect AI.

  1. Click the ... (toggle agent menu) and select Settings
  2. Under LLM Providers, expand your preferred provider (e.g., Anthropic, OpenAI, Google AI) and enter your API key
  3. Under Model Context Protocol (MCP) Servers, confirm that cdata appears with a green dot and the toggle is enabled πŸ‘ Verifying the CData MCP Server is enabled in Zed Settings

With the MCP server registered and an LLM provider configured, the Zed agent is ready to query live Azure Data Lake Storage data through Connect AI.

Step 3: Query live Azure Data Lake Storage data from the Zed agent

With the integration complete, use the Zed agent panel to explore and interact with live Azure Data Lake Storage data through natural language prompts.

  1. Open the agent panel using Ctrl + Shift + / and start a new thread
  2. Enter a prompt to interact with your data, for example:
    • List all catalogs in my cdata connection
    • Show the available schemas and tables for Azure Data Lake Storage
    • Query the top 5 records from a table in Azure Data Lake Storage data
  3. The agent calls the CData Connect AI MCP Server and returns live results from Azure Data Lake Storage data πŸ‘ Querying live data from the Zed agent panel

At this point, your Zed agent communicates with the CData Connect AI MCP Server and retrieves live Azure Data Lake Storage data through remote MCP tools directly from the editor.

Get CData Connect AI

To access hundreds of SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect AI today! Start a free 14-day trial of CData Connect AI today, and as always, our world-class Support Team is available to assist you with any questions you may have.