CData JDBC Driver for ADLS は、データベースとしてAzure Data Lake Storage data に連携できるようにすることで、Azure Data Lake Storage data をDBArtisan などのデータベース管理ツールにシームレスに連携します。ここでは、DBArtisan でAzure Data Lake Storage のJDBC ソースを作成する方法を説明します。データを直観的に標準SQL で実行できます。
Azure Data Lake Storage Data をDBArtisan Projects に連携
以下のステップに従って、Azure Data Lake Storage をプロジェクトのデータベースインスタンスとして登録します。
- DBArtisan で、[Data Source]->[Register Datasource]とクリックします。
- [Generic JDBC]を選択します。
- [Manage]をクリックします。
- 表示されるダイアログで、[New]をクリックします。ドライバーの名前を入力し、[Add]をクリックします。次に、ドライバーJAR に移動します。ドライバーJAR は、インストールディレクトリのlib サブフォルダにあります。
-
Connection URL ボックスで、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:
- 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 URL の構成については、Azure Data Lake Storage JDBC Driver に組み込まれている接続文字列デザイナーを使用してください。JAR ファイルのダブルクリック、またはコマンドラインからJAR ファイルを実行します。
java -jar cdata.jdbc.adls.jar
接続プロパティを入力し、接続文字列をクリップボードにコピーします。
下は一般的な接続文字列です。
jdbc:adls:Schema=ADLSGen2;Account=myAccount;FileSystem=myFileSystem;AccessKey=myAccessKey;InitiateOAuth=GETANDREFRESH
- ウィザードを終了して、Azure Data Lake Storage に接続します。Azure Data Lake Storage エンティティは、[Datasource Explorer]に表示されます。
ほかのデータベースを使うのと同じように、Azure Data Lake Storage を使うことができます。
Azure Data Lake Storage API にサポートされているクエリについてのより詳しい情報は、ドライバーのヘルプドキュメントを参照してください。