> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Workbench 4でCSVデータに接続する

## はじめに

You can create a CSV DataSet Job in Workbench 4. When you select CSV as your Data Source type, you can specify the file path of the CSV data source and configure options such as delimiters, missing field handling, etc.

<Note>
  **注記：** CSVファイルは必ず以下のとおりになっている *必要があります* 。

  * テキストファイルであること
  * データが単一の文字で区切られている。区切り文字は
    **高度な設定で指定します** 。
</Note>

**CSVのサンプル**

```
セールスパーソン,ID,3月売上,ノルマ達成？
  
"MacGregor, Sam",1156724,"$10,909",Y
  
"Orton, Jason",1156738,"$6,008",N
  
"Butler, Heidi",1156742,"$4,321",N
  
"Hope, Frank",1156749,"$13,888",Y
  
"Perez, Katrina",1156768,"$11,472",Y
  
"Wood, Howard",1156777,"$7,446",N
  
"Yager, Dorothy",1156787,"$3,825",N
  
"Jeepers, Adam",1156796,"$9,942",Y
  
"Pendlesmythe, Ellen",1156803,"$14,578",Y
  
"Ferrera, Luigi",1156809,"$11,239",Y
  
"Coulsey, Mason",1156819,"$5,213",N
  
"Michelsen, Bruce",1212121,"$20,250",Y7
```

**トレーニングビデオ - Workbench 4 を使ってファイルをアップロード**

Workbench 4 で、CSV と Excel ファイルをアップロードする方法を学びましょう。

**パート1（全4パート）**

<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/412866033" width="560" />

**パート2（全4パート）**

<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/412866261" width="560" />

**パート3（全4パート）**

<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/412866767" width="560" />

**パート4（全4パート）**

<iframe allowfullscreen="" frameborder="0" height="315" src="//player.vimeo.com/video/412866962" width="560" />

## Connecting to CSV Data

**Workbench 4 でCSV DataSetジョブを作成するには、**

1. Click **Add New** in the **DataSet Jobs** grouping in the Buttons toolbar at the top of the Workbench window.

   This opens the **Workbench DataSet Job Creation Wizard**.

2. （条件付） 要求されたら、Domoサーバーを選択します。 (This screen only appears if you have more than one server set up in Workbench.)

3. In the **DataSet Job Name** field, enter a name for the DataSet Job. これは、Workbench で表示されるジョブ名です。Domo にアップロードされた DataSet 名ではありません。

4. In the **DataSet Name** field, enter the name of the DataSet. これは、DomoにアップロードされたDataSet名です。

5. Select the desired update method in the **Update Method** menu:

   * Select **Replace DataSet** if you want the DataSet to be replaced entirely upon updating.
   * Select **Append to DataSet** if you want new data to be added to the existing data set upon updating.

6. In the **Transport Method** menu, select **Local File Provider,** **External Process File Provider**, or **FTP/SFTP File Provider**.

   これらトランスポート方法の詳細は、以下のとおりです。

   <table class="mt-responsive-table"><thead><tr><th colspan="1" rowspan="1"><p><span class="info-box-icon"> トランスポート方法 </span></p></th><th colspan="1" rowspan="1"><p><span class="info-box-icon"> 説明 </span></p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p><span class="info-box-icon"> ローカルファイルプロバイダー </span></p></td><td colspan="1" rowspan="1"><p><span class="info-box-icon"> 自分のマシンまたはネットワークからファイルを選択できます。 </span></p></td></tr><tr><td colspan="1" rowspan="1"><p><span class="info-box-icon"> 外部プロセスファイルプロバイダー </span></p></td><td colspan="1" rowspan="1"><p><span class="info-box-icon"> サードパーティアプリケーションから、スクリプトを使ってデータをDomoに引き込みます。 </span></p></td></tr><tr><td colspan="1" rowspan="1"><span class="info-box-icon"> FTP/SFTPファイルプロバイダー </span></td><td colspan="1" rowspan="1"><span class="info-box-icon"> ファイルをFTP、SFTP（SSH-FTP）、または FTPS（FTP-SSL）経由で取得します。 </span></td></tr></tbody></table>

7. Click **Next**.

8. In the **Data Source** menu, select **CSV**.

9. In the **DataSet Type** field, select the type of DataSet in the dropdown or enter a custom name.

   ここで選択または入力するDataSetのタイプは、ジョブ実行後のDomoのコネクタータイプに反映されます。

   <Tip>
     **Tip:** It is recommended that you select or enter the DataSet type that tells users what data is being represented, *not* the data reader you are using to present the data. 例えば、Twitter のデータを含んでいる CSV ファイルに接続するとします。 In this case the best option would be to enter "Twitter" rather than selecting **CSV** because the data you are representing in Domo is from Twitter, not CSV.
   </Tip>

10. (Optional) Enter a description in the **DataSet Description** field.

    <Note>
      **Note:** You can change any of the settings you made in the above steps in the **Source** panel for the DataSet Job after you complete all of the steps in the Wizard *except* the transport method.
    </Note>

11. Click **Next**.

    A new CSV DataSet Job is added to the list of jobs for the currently authenticated server in the **Accounts** pane.

12. Under the CSV DataSet Job that was just added to the jobs list, select **Source**.

    A panel opens with options for configuring your file transport and setting options for your CSV data source.

13. （条件付き）以下のいずれかを行ってください。

    * If you selected **Local File Provider** as your Transport Method...

      1. **\[ファイルパス]** フィールドで省略記号（...）をクリックします。
      2. 自分のマシンまたはネットワークからCSVファイルを選択します。

    * If you selected **External Process File Provider** as your Transport Method...

      1. **\[プログラムの実行可能ファイル]** フィールドで省略記号（...）をクリックします。
      2. 自分のマシンまたはネットワークから実行可能ファイルを選択します。
      3. （オプション）引数がある場合は **\[引数]** フィールドに入力します。
      4. **\[出力ファイルパス]** フィールドで省略記号（...）をクリックします。
      5. 自分のマシンまたはネットワークの出力ファイルパスを選択します。

         出力パスのファイルタイプは、CSVである *必要があります* 。

         <Warning>
           **重要：** 直接アップロードオプションを使用する場合は、最初に宛先列の名前を変更するまでこのオプションを有効にしないでください。詳しくは、「 [Workbenchで直接アップロードを設定する](/ja/s/article/360047538593 "Workbenchで直接アップロードを設定する") 」を参照してください。
         </Warning>

    * If you selected **FTP/** **SFTP File Provider** as your Transport Method...

      1. **\[サーバー]** フィールドにサーバー名を入力します。
      2. **\[ポート]** フィールドにポート番号を入力します。
      3. **\[ユーザー名]** および **\[パスワード]** にサーバーの認証情報を入力します。
      4. プロトコルを選択します（**\[FTP]** 、 **\[SFTP]** 、または **\[FTPS]** ）。
      5. （オプション）SSL証明書がある場合は（\[SFTP] と \[FTPS] のみ）、必要に応じて設定します。

         詳細については、「 [SFTPファイルプロバイダー](/ja/s/article/360047403773 "Workbench 4ユーザーインターフェースについて") 」を参照してください。
      6. **\[リモートファイル]** フィールドに、インポートするフィールドのファイル名を入力します。

14. Click **Apply Changes**.

15. **\[フィールド区切り文字]** メニューで、CSVファイルで使われている区切り文字を該当するラジオボタンで選択します。カスタマイズされた区切り文字を設定するには、 **\[その他]** ラジオボタンをクリックし、フィールドに区切り文字を入力します。

16. **\[フィールドをカプセル化する：]** フィールドで、カプセル化するのに使用する文字を指定します。

17. （オプション）**\[エスケープシーケンス文字]** フィールドで、エスケープに使用する文字を指定します。

18. （オプション）**\[コメント文字]** フィールドで、コメントに使用する文字を選択します。

19. **\[欠落フィールドの処理]** セクションで、CSVファイルで欠落フィールドに遭遇した場合の対処方法を、ラジオボタンから選択します。

    <table border="1" cellpadding="1" cellspacing="1"><thead><tr><th colspan="1" rowspan="1"><p><span class="info-box-icon"> オプション </span></p></th><th colspan="1" rowspan="1"><p><span class="info-box-icon"> 説明 </span></p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p><span class="info-box-icon"> エラーを生成する </span></p></td><td colspan="1" rowspan="1"><p><span class="info-box-icon"> CSVファイルで欠落フィールドに遭遇した場合、Workbenchはエラーを出します。 </span></p></td></tr><tr><td colspan="1" rowspan="1"><p><span class="info-box-icon"> 空の値と置き換える </span></p></td><td colspan="1" rowspan="1"><p><span class="info-box-icon"> CSVファイルで欠落しているフィールドをDomoのDataSet内で空の値と置き換えます。 </span></p></td></tr></tbody></table>

20. セル範囲の最初の行に列ヘッダーがある場合は、ボックスにチェックを入れたままにします。それ以外は、ボックスをクリアします。列ヘッダーは、その列のデータを参照するために使用されるので、Domoでカードを作成する際、これは重要になります。
    [詳細については、「](/ja/s/article/360043428713 "DataSet 列をチャートに適用する") DataSet列をチャートに適用する 」を参照してください。

21. If you want Workbench to skip empty lines in your CSV file when sending the data to Domo, check the box for
    **Sanitize data before processing**; otherwise leave it unchecked.

22. (Optional) In the **Ignore starting rows** field, specify the number of rows to skip at the beginning of the data so you can start importing a specific row.

    This does *not* include the header row containing the column names.

23. （オプション）**\[末尾行を無視する]** フィールドで、データの最後でスキップする行数を指定します。

24. **\[テキストエンコード]** メニューで、CSVファイルで使用される文字エンコーディングを指定します。

これでDomoにCSV DataSetが作成され、DataSetジョブを実行する準備ができました。しかし、Domoに送信する前にDataSetジョブでできる操作はたくさんあります。これには以下のものが含まれます。

* [ジョブの更新スケジュールを設定する](/ja/s/article/360046856934 "Workbench 4でジョブをスケジューリングする")
* [Windowsタスクスケジューラで高度なスケジュールが設定されたジョブグループに、ジョブを追加する](/ja/s/article/360046857074 "Workbench 4 でスケジュールグループを作成する")
* [ジョブの更新が成功または失敗したら通知するよう設定する](/ja/s/article/360047494393 "Workbench 4で通知を設定する")
* [Workbenchデータの暗号化と復号を行う](/ja/s/article/360047501293 "Workbench 4データの暗号化と復号を行う")
* [計算を使用して新しい列を作成する](/ja/s/article/360046861474 "Workbench 4で計算を使用して列を作成する")
* [列にカスタム日付形式を設定する](/ja/s/article/360047504553 "Workbench 4で列にカスタム日付形式を設定する")
* [列の値の置き換える](/ja/s/article/360046864274 "Workbench 4で列の値の置き換える")
* [DataSetを結合する](/ja/s/article/360046861014 "Workbench 4でDataSetを結合する")
* [列にフィルターをかける](/ja/s/article/360046864074 "Workbench 4で列にフィルターをかける")
