製品をチェック

無償トライアル:

無償トライアルへ

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

Azure Data Lake Storage JDBC Driver

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

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

お問い合わせ

KNIME でAzure Data Lake Storage のJDBC ドライバーを有効にする


KNIME の標準データアクセスコンポーネントを使用してAzure Data Lake Storage でチャートとレポートを作成します。


加藤龍彦
ウェブデベロッパー

azuredatalake ロゴ画像

JDBC Driver

jdbc ロゴ画像
KNIME ロゴ画像

CData JDBC Driver for ADLS の強みの一つは、クロスプラットフォームのサポートであり、主要なBI ツールとの統合を可能にします。以下のステップに従って、KNIME のAzure Data Lake Storage にアクセスし、レポートデザイナを使用してAzure Data Lake Storage からチャートを作成します。

CData JDBC Driver for ADLS を使用することで、JDBC データソースとしてAzure Data Lake Storage にアクセスでき、IDE の迅速な開発ツールとの統合が可能になります。この記事では、データソース構成ウィザードを使用してIntelliJ のAzure Data Lake Storage に接続する方法を示します。

Azure Data Lake Storage データへの新しいJDBC 接続を定義します。

  1. Report Designer 機能をインストールします。[File]->[Install KNIME Extensions]とクリックし、[Report]でフィルタリングします。
  2. 新しいワークフローで[File]->[Preferences]をクリックし、[KNIME]->[Databases]でノードを展開し cdata.jdbc.adls.jar を追加します。
  3. ドライバーJAR は、インストールディレクトリのlib サブフォルダにあります。 CData drivers added to a KNIME workflow.
  4. [Node Repository]ビューで[Database]->[Read/Write]とノードを展開し、[Database Reader]をワークフローエディターにドラッグします。 The DataReader that will load Azure Data Lake Storage data into the workflow with a SELECT query.(QuickBooks is shown.)
  5. [Database Reader]をダブルクリックし、次のプロパティを設定します。

    • Database Driver:メニューでドライバーの名前(cdata.jdbc.adls.ADLSDriver)を選択します。
    • Database URL:接続プロパティを入力します。jdbc:adls: から始まり、その後にセミコロンで区切られた接続プロパティのリストが続くJDBC URL を入力します。

      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 URL の構成については、Azure Data Lake Storage JDBC Driver に組み込まれている接続文字列デザイナを使用してください。JAR ファイルのダブルクリック、またはコマンドラインからJAR ファイルを実行します。

      java -jar cdata.jdbc.adls.jar

      接続プロパティを入力し、接続文字列をクリップボードにコピーします。

      Using the built-in connection string designer to generate a JDBC URL (Salesforce is shown.)

      JDBC URL を構成する際に、Max Rows プロパティを定めることも可能です。これによって戻される行数を制限するため、可視化・レポートのデザイン設計時のパフォーマンスを向上させるのに役立ちます。

      以下は一般的なJDBC URL です。

      jdbc:adls:Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;InitiateOAuth=GETANDREFRESH
    • User Name:認証に使用されるユーザー名
    • Password:認証に使用されるパスワード
    • SQL Statement:[SQL Statement]ボックスにSQL クエリを入力するか、テーブルをダブルクリックします。この記事では、チャートの作成に以下のクエリを用います。 SELECT FullPath, Permission FROM Resources WHERE Type = 'FILE'
  6. [Fetch Metadata]をクリックして接続を確認します。

    The SELECT statement defined in the Database Reader properties.(QuickBooks is shown.)
  7. [Database Reader]を[Data to Report]ノードに接続し、データセットを様々なデータ可視化コントロールに提供します。[Execute]をクリックし、ワークフローの上部にある[Edit Report]をクリックしてレポートデザイナパースペクティブを開きます。 A Database Reader linked to provide data to a Database Report.
  8. ライブデータに基づいてレポートを作成できます。チャートを作成するには、チャートコントロールをパレットからレポートデザイナにドラッグします。表示されるウィザードでは、KNIME で使用可能なフィルタリングおよび集約コントロールを使用できます。 A Chart created with the report designer.

トラブルシューティング

次のリストは一般的なエラーを解決する方法を示しています。

  • [Row1]という重複するIdが見つかりました。:このエラーを解決するには、KNIME インストールディレクトリにあるknime.ini ファイルに-Dknime.database.fetchsize=0を追加します。