# ジョブを作成

このサンプルでジョブを作成、設定、および実行する前に、次の点を確認します:

* 入力ファイルにはそれぞれ、ファイル内のカラムの名前が含まれているヘッダー行があること。
* MySQLテーブルには、対応するソースファイルのカラムと同じ名前のカラムがあります。
* ソースファイルは、ファイルシステムで使用できます。

## 親ジョブの作成

### 手順

1. 標準ジョブを作成し、LoadDynamicSchemaParentという名前を付けます。
2. 次のコンポーネントをデザインワークスペースに配置し、ジョブのロールに応じてラベルを付けます。
   | コンポーネント | [Label] (ラベル) |
   | --- | --- |
   | tFileList | File\_list |
   | tIterateToFlow | File\_name\_flow |
   | tMap | File\_table\_lookup |
   | tFixedFlowInput | Mappings |
   | tJavaRow | Set\_context\_variables |
   | tRunJob | Call\_child |
3. コンポーネントを接続します:
   1. [Row] (行) &gt; [Iterate] (反復処理)接続を使用してtFileListからtIterateToFlowへ
   2. [Row] (行) &gt; [Main] (メイン)接続を使用したtIterateToFlowからtMapへ
   3. [Row] (行) &gt; [Main] (メイン)接続を使用したtFixedFlowInputからtMapへ
   4. [Row] (行) &gt; [Main] (メイン)接続を使用したtMapからtJavaRow このサンプルではoutと呼ばれています)
   5. [Row] (行) &gt; [Main] (メイン)接続を使用したtJavaRowからtRunJobへ

   ![Designerでのジョブのスクリーンショット。](https://help.qlik.com/talend/ja-JP/data-integration-job-examples/Resources/images/dynamicschema_jobexample_parentjob.png)

## 子ジョブの作成

### 手順

1. 標準ジョブを作成し、LoadDynamicSchemaChildという名前を付けます。
2. 次のコンポーネントをデザインワークスペースに配置し、ジョブのロールに応じてラベルを付けます。
   | コンポーネント | ラベル |
   | --- | --- |
   | tFileInputDelimited | Input\_file |
   | tDBOutput | Write\_to\_DB |
3. tDBOutputコンポーネントの[Basic settings] (基本設定)ビューで、[Database] (データベース)リストからMySQLを選択し、[Apply] (適用)をクリックします。
4. [Row] (行) &gt; [Main] (メイン)接続を使用して、tFileInputDelimitedコンポーネントをtDBOutputコンポーネントに接続します。

   ![Designerでのジョブのスクリーンショット。](https://help.qlik.com/talend/ja-JP/data-integration-job-examples/Resources/images/dynamicschema_jobexample_childjob.png)