# スクリプトを使ってTalend Studioで複数接続を設定

利用対象...

* Big Data
* Big Data Platform
* Data Fabric
* Data Integration
* Data Management Platform
* Data Services Platform
* ESB
* MDM Platform
* Real-Time Big Data Platform

Talend Studioでは、スクリプトを使って一度に複数の接続を作成できます。

次の例で、スクリプトを使ってローカル接続とTalend Administration Center接続を一度に作成する方法を示します。

## 手順

1. JSON形式で接続の詳細を定義するスクリプトファイルを作成します。

   この例では、スクリプトにmyConnections.jsonという名前を付けてTalend Studioインストールディレクトリーに配置します。
   ```
   [
       {
           "name": "localConnection",
           "description": "My local connection",
           "local": true,
           "user": "doc@company.com",
           "workSpace": "D:\\Talend\\workspacelocal"
       },
   	{
           "name": "remoteConnection",
           "description": "My remote connection",
           "local": false,
           "user": "dev@company.com",
           "password": "mypassword",
           "workSpace": "D:\\Talend\\workspaceremote",
           "url": "http://192.128.8.88:8081/org.talend.administrator"
       }
   ]
   ```

   情報メモ警告: ワークスペースディレクトリーのパスにスペースまたは特殊文字が含まれていないことを確認してください。JVMの互換性の問題でTalend Studioが動作しなくなる可能性があります。
2. Talend Studioインストールディレクトリーで、次のコマンドを実行します。
   ```
   Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.GenerateConnection -consoleLog -data commandline-workspace -f myConnections.json
   ```

   情報メモ注: この例では、Talend StudioをMicrosoft Windowsで使用しているものと仮定しています。別のオペレーティングシステムを使用している場合は、そのオペレーティングシステムに対応するTalend Studioの実行可能ファイルを使用します。
3. Talend Studioを起動します。
4. Talend Studioログインウィンドウで[Manage Connections] (接続を管理)をクリックし、[Connections] (接続)ウィンドウを開いて接続をチェックします。

   スクリプトファイルで定義されている接続が作成され、[Connections] (接続)ウィンドウに表示されます。