CData JDBC Driver for ADLS は、JDBC 標準に準拠し、BI ツールからIDE まで幅広いアプリケーションでAzure Data Lake Storage への接続を提供します。この記事では、DbVisualizer からAzure Data Lake Storage に接続する方法、およびtable エディタを使ってAzure Data Lake Storage を ロード、 する方法を説明します。
Azure Data Lake Storage データの新しいJDBC データソースを作成
下記の手順に従って、Driver Manager を使ってDbVisualizer ツールからAzure Data Lake Storage に接続します。
- DbVisualizer で[Tools]>[Driver Manager]>[Create a New Driver]をクリックします。
- データソースに名前を入力します。
- [URL Format]ボックスに以下を入力します:
jdbc:adls:
DbVisualizer Driver Manager
-
[User Specified]タブで[User Specified]ボタンをクリックし、インストールディレクトリの[lib]サブフォルダ内のcdata.jdbc.adls.jar ファイルを選択します。
- [Driver Class]メニューでADLSDriver クラス、cdata.jdbc.adls.ADLSDriver を選択します。
JDBC データソースへの接続を定義
下記の手順に従って、JDBC URL に接続プロパティを入力します。
- [Database] タブで[Database Connection]ノードを右クリックし、[Create a Database Connection]をクリックします。
[Connection]セクションで以下のオプションを設定します:
- Database Type:ウィザードオプションを選択した場合は、データベースの種類は自動検出される。ウィザードを使用しないオプションを選択した場合は、[Database Type]メニューから[Generic]または[Auto Detect]オプションを選択。
- Driver:先ほど作成したドライバーを選択。
Database URL:フルJDBC URL を入力。JDBC URL シンタックスは以下のとおりです。 jdbc:adls: 次に、セミコロン区切りでname-value ペアの接続プロパティを入力します。
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:
- Sign in to your Azure Account through the
[.
]- Select "Azure Active Directory".
- Select "App registrations".
- Select "New application registration".
- Provide a name and URL for the application. Select Web app for the type of application you want to create.
- 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.
- 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;
- Database UserId:Azure Data Lake Storage を認証するユーザーネーム。
- Database Password:Azure Data Lake Storage を認証するパスワード。
-
[Connection]タブで[Connect]をクリックします。
QuickBooks JDBC Driver が表示するテーブルをブラウズするには、テーブルを右クリックし[Open In New Tab]をクリックします。
SQL クエリの実行には、SQL Commander ツールを使います:[SQL Commander]>[New SQL Commander]をクリックします。利用可能なメニューから[Database Connection]、[Database]、[Schema]を選択します。
サポートされるSQL についての詳細は、ヘルプドキュメントの「サポートされるSQL」をご覧ください。テーブルに関する情報は「データモデル」をご覧ください。