Ready to get started?

Learn more or sign up for a free trial:

CData Connect Server

Query Azure Data Lake Storage Data in MySQL Workbench



Create a virtual MySQL database for Azure Data Lake Storage data in CData Connect (or Connect Server) and work with live Azure Data Lake Storage data in MySQL Workbench.

MySQL Workbench allows users to administer MySQL environments and gain better visibility into databases. When paired with CData Connect (on-premise or Connect Server), you get live access to Azure Data Lake Storage data as if it were a MySQL database. This article shows how to create a virtual database for Azure Data Lake Storage in Connect and work with live Azure Data Lake Storage data in MySQL Workbench.

Create a Virtual MySQL Database for Azure Data Lake Storage Data

CData Connect uses a straightforward, point-and-click interface to connect to data sources and generate APIs.

  1. Login to Connect and click Connections.
  2. Select "Azure Data Lake Storage" from Available Data Sources.
  3. 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 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 "Azure Active Directory".
    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.
  4. Click Save Changes
  5. Click Privileges -> Add and add the new user (or an existing user) with the appropriate permissions.

With the virtual database created, you are ready to connect to Azure Data Lake Storage from MySQL Workbench.

Query Azure Data Lake Storage from MySQL Workbench

The steps below outline connecting to the virtual Azure Data Lake Storage database in Connect from MySQL Workbench and issuing basic queries to work with live Azure Data Lake Storage data.

Connect to Azure Data Lake Storage through Connect

  1. In MySQL Workbench, click to add a new MySQL connection.
  2. Name the connection (CData Connect).
  3. Set the Hostname, Port, and Username parameters to connect to the SQL Gateway.
  4. Click Store in Vault to set and store the password.
  5. Click Test Connection to ensure the connection is configured properly and click OK.

Query Azure Data Lake Storage Data

  1. Open the connection you just created (CData Connect).
  2. Click File -> New Query Tab.
  3. Write a SQL query to retrieve Azure Data Lake Storage data, like SELECT * FROM azuredatalakedb.Resources;

With access to live Azure Data Lake Storage data from MySQL Workbench, you can easily query and update Azure Data Lake Storage, just like you would a MySQL database. Request a demo of the CData Connect and start working with Azure Data Lake Storage just like a MySQL database today.