製品をチェック

無償トライアル:

無償トライアルへ

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

Azure Data Lake Storage ODBC Driver

Azure Data Lake Storage ODBC Driver を使って、ODBC 接続をサポートするあらゆるアプリケーション・ツールからAzure Data Lake Storage にデータ連携。

Azure Data Lake Storage にデータベースと同感覚でアクセスして、Azure Data Lake Storage データに使い慣れたODBC インターフェースで連携。

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

お問い合わせ

Azure Data Lake Storage データをA5:SQL Mk-2 でCRUD クエリする方法


ODBC Driver 経由でAPI コーディングなしでAzure Data Lake Storage データを自在にCRUD。


兵藤朋代
コンテンツスペシャリスト

azuredatalake ロゴ画像

ODBC Driver

odbc ロゴ画像
A5:SQL Mk-2 ロゴ画像

SQL 開発ツールといえば「A5:SQL Mk-2」が有名です。Windows ODBC に強い!というイメージです。多くのエンジニアやIT 担当者に利用されています。 本記事では、Azure Data Lake Storage データをCData ODBC Driver を使って、A5:SQL MK-2 からクエリする方法を説明します。

CData ODBC Drivers のインストールとAzure Data Lake Storage への接続設定

まずは、本記事右側のサイドバーからADLS ODBC Driver の無償トライアルをダウンロード・インストールしてください。ODBC ドライバーのインストール完了時にODBC DSN 設定画面が立ち上がります。または、Microsoft ODBC データソースアドミニストレーターを使ってDSN を作成および設定できます。

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.

A5:SQL Mk-2 からのAzure Data Lake Storage ODBC データソースのクエリ利用方法

ODBC DSN の利用方法

「データベース」→「データベースの追加と削除」を開きます。

「64bit ODBCシステムデータソースを列挙する」にチェックを入れます。システムデータソースを利用するか、ユーザーデータソースを利用するかはどちらでもかまいません。

データベースとして、設定しているODBC DSN がツリービューで表示されます。CData ODBC Driver で設定されたDSN もここに表示されます。

「CData Azure Data Lake Storage Sys」をダブルクリップします。データベースログイン画面が開くので、ODBC DSN 設定時に使ったAzure Data Lake Storage のユーザーとパスワードでログインします。

Azure Data Lake Storage のオブジェクトがテーブル・ビュー・ストアドプロシージャにモデル化されて表示されます。

テーブルを開いてみます。オブジェクトで利用できるデータがカラムとしてモデル化されています。それぞれのカラムにはデータ型の情報も付いています。

これでA5:SQL Mk2 でAzure Data Lake Storage データがクエリできます。

Azure Data Lake Storage データをSELECT する

対象のテーブル・ビューを右クリックして「SQL の作成」をクリックしてクエリ作成画面を開きます。

SELECT にチェックを入れます。とりあえず全カラムを指定して条件なしでクエリしてみます。

SQL クエリがA5M2 から生成されます。実行ボタンで実行するとAzure Data Lake Storage の選択したオブジェクトがクエリされ、データがテーブルとして返されます。

次にフィルタリング条件を付けてみます。SQL の作成画面で「絞り込み条件に利用するカラム」をドロップダウンから選択します。以下の絞り込み条件付きのSQL 文がA5M2から生成されるので、WHERE 句に条件を書いて実行します。

--*DataTitle "Azure Data Lake Storage"."(テーブル名)" --*CaptionFromComment SELECT "Id" -- Id , "LastName" -- LastName , "FirstName" -- FirstName , "Name" -- Name , "Title" -- Title , "Company" -- Company , "Status" -- Status , "Industry" -- Industry FROM "ADLS"."Lead" WHERE "Company" = '(フィルタリング条件を入力)'

同じ要領でSQL 作成UI から、SELECT だけでなく、INSERT、UPDATE、DELETE のクエリが作成できます。JOIN や集計クエリもANSI-92 のSQL で作れます。

このように、CData ODBC Drivers を使うことで、Azure Data Lake Storage データを標準SQL でクエリすることができるようになります。是非、CData ODBC Drivers の30日の無償評価版 をお試しください。