製品をチェック

無償トライアル:

無償トライアルへ

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

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 インターフェースで連携。

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

お問い合わせ

MATLAB からAzure Data Lake Storage データをリアルタイムに連携利用


ODBC Driver 経由でノンプログラミングでAzure Data Lake Storage データをMATLAB にフィード


古川えりか
コンテンツスペシャリスト

azuredatalake ロゴ画像

ODBC Driver

odbc ロゴ画像
MATLAB ロゴ画像


MathWorks 社のMATLAB は、高度なデータ解析、アルゴリズム開発、モデル作成などを手軽に実施できるツールとして多くの数学者、科学者、技術者に愛用されています。 本記事では、MATLAB からAzure Data Lake Storage データをノンコーディングで利用する方法を説明します。 Azure Data Lake Storage データをMATLAB から利用できるように、CData ODBC Driver でAzure Data Lake Storage データをテーブルデータにモデル化して、MATLAB が生成する標準SQL でのフィルタリングやJOIN を利用できるようにしています。

CData ODBC Drivers のインストールとサービスへの接続設定

ODBC 接続プロパティの指定がまだの場合は、DSN (データソース名)で接続設定を行います。 Microsoft ODBC データソースアドミニストレーターを使ってODBC DSN を作成および設定できます。 ODBC ドライバーのインストール完了時にODBC DSN 設定画面が立ち上がります。 Microsoft ODBC データソースアドミニストレーターを開いて設定を行うことも可能です。 必要なプロパティを設定する方法は、ヘルプドキュメントの「はじめに」をご参照ください。

  • Schema
  • Account
  • FileSystem
  • AccessKey

Microsoft ODBC データソースアドミニストレーターで必要なプロパティを設定する方法は、ヘルプドキュメントの「はじめに」をご参照ください。

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.

MATLAB からのAzure Data Lake Storage ODBC データソースの利用方法

ODBC DSN の利用方法

「アプリ」⇒「Database Explorer」を選択します。
「New Query」をクリックして、データソース接続画面で、「Data Source」をドロップダウンすると、事前に設定したODBC DSN が表示されます。これらからAzure Data Lake Storage のものを選択します。Username、Password は入力不要です。

CData ODBC Driver により、データはスキーマの付いたテーブルデータにモデル化されており、左ペインの[データブラウザー]にRDB のように表示されます。 ここから利用するデータを選択すると、自動的にSELECT クエリが生成され、プレビューが実行されます。 MATLAB で生成されているSQL がODBC Driver 経由でParse されて、リアルタイムで元のデータソースのAPI を叩きに行っています。

Azure Data Lake Storage データのフィルタリングやソートの利用

MATLAB では、SQL クエリが分からないユーザーでも、フィルタリング、ソートなどができるようなUI が用意されています。 フィルタリングであれば、「Where」、ソートであれば「Order By」のアイコンからSQL の知識なしに操作が可能です。「Join」も可能です。
CData ODBC Driver 経由でモデル化されたSaaS、NoSQL データにも、MATLAB のUI からのフィルタリングやソートが利用可能です。

「DATABASE EXPLORER」の「Where」アイコンをクリックします。 Column でフィルタリングする項目を選択、Operator で演算子を選択、Value にフィルタリングをする値を直接入力します。 「Add Filter」ボタンを押すと、フィルタリングのSQL が生成され、プレビューのデータがフィルタリングされます。 もし、フィルタリングを変更する場合には、変更して「Update Filter」をクリック。また複数のフィルタリングを設定することができます。

同様に、ソートを行うには、「Order By」アイコンを押し、並び替え項目を選択し、昇順・降順を指定するとSQL が生成されます。

データの整形が終わったら、データをData Explorer からMATLAB のワークスペースにインポートします。

このように、CData ODBC Drivers と併用することで、100を超えるSaaS、NoSQL データをRDB データのようにMATLAB からコーディングなしで扱うことができます。 CSV インポートと違い、リアルタイムODBC 連携なので、データソースをリフレッシュするだけで、繰り返し作業なく最新データへの更新も可能です。