製品をチェック

無償トライアル:

無償トライアルへ

製品の情報と無償トライアルへ:

Azure Data Lake Storage JDBC Driver

Azure Data Lake Storage データに連携するJava アプリケーションを素早く、簡単に開発できる便利なドライバー。

データ連携でお困りですか?

お問い合わせ

Squirrel SQL Client からAzure Data Lake Storage データに連携


Azure Data Lake Storage に接続し、Squirrel SQL Client でクエリを実行します。


azuredatalake ロゴ画像
jdbc ロゴ画像

JDBC

SQuirreL ロゴ画像

CData JDBC Driver for ADLS を使用して、Squirrel SQL Client などのツールでAzure Data Lake Storage へのクエリを実行できます。この記事では、JDBC data source for ADLS を作成し、クエリを実行します。

JDBC Driver for ADLS を追加する

以下のステップに従ってドライバーJAR を追加します。

  1. Squirrel SQL で[Windows]->[View Drivers]と進みます。
  2. プラスアイコンをクリックし、[Add Driver]ウィザードを開きます。
  3. [Name]ボックスで、CData JDBC Driver for ADLS のようなドライバーのわかりやすい名前を入力します。
  4. [Example URL]ボックスで、jdbc:adls: と入力します。
  5. [Extra Class Path]タブで[Add]をクリックします。
  6. 表示される[file explorer]ダイアログで、インストールディレクトリのlib サブフォルダにあるドライバーのJAR ファイルを選択します。
  7. [List Drivers]をクリックして[Class Name]メニューにドライバーのクラス名(cdata.jdbc.adls.ADLSDriver) を入力します。
The definition for the JDBC data source.(Salesforce is shown.)

接続プロパティを定義する

以下のステップに従って、接続プロパティをドライバーエイリアスに保存します。

  1. [Windows]->[View Aliases]と進みます。
  2. エイリアスが一覧表示されているペインで、プラスアイコンをクリックします。
  3. 表示される[Add Alias]ウィザードで、JDBC ドライバーには以下のフィールドが要求されます。

    • Name:CData Azure Data Lake Storage Source のようなエイリアスの名前を入力します。
    • Driver:CData JDBC Driver for ADLS を選択します。
    • URL:jdbc:adls: と入力します。
    The alias definition, containing the connection parameters.(Salesforce is shown.)
  4. 追加のプロパティを定義する場合は、[Properties]をクリックします。
  5. 表示されるダイアログの[Driver properties]タブで、[Use driver properties]のチェックボックスを選択します。
  6. [Specify]カラムで必要な接続プロパティのチェックボックスを選択します。

    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.

    以下は一般的な接続文字列です。

    jdbc:adls:Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;InitiateOAuth=GETANDREFRESH Connection properties automatically detected by Squirrel SQL.(Salesforce is shown.)
  7. [OK]をクリックし、表示されるダイアログで[connect]をクリックして接続を確認します。

スキーマを検出しAzure Data Lake Storage データをクエリする

メタデータが読み込まれると、Azure Data Lake Storage データソースの新しいタブが表示されます。[Objects]サブタブでは、使用可能なテーブルやビューなどのスキーマ情報を見つけることができます。

Column metadata for a table.(Salesforce is shown.)

テーブルデータを表示するには[Objects]タブでテーブルを選択します。その後、テーブルデータが[Content]タブのグリッドに読み込まれます。

Tables can be edited on the Content tab.(Salesforce is shown.)

SQL クエリを実行するには、[SQL]タブにクエリを入力し、[Run SQL](ランナーアイコン)をクリックします。例:

SELECT FullPath, Permission FROM Resources WHERE Type = 'FILE' A query and the results.(Salesforce is shown.)