Table of Contents

Search

  1. Preface
  2. Introduction
  3. Dashboard
  4. Resources
  5. Workflows
  6. Task Reference
  7. Services Overview
  8. Users
  9. Logs and Reports
  10. Encryption
  11. System
  12. Appendix
  13. Glossary Terms

Managed File Transfer User Guide

Managed File Transfer User Guide

Example 2: Read CSV Using a File Set

Example 2: Read CSV Using a File Set

The Read CSV task can use the File Set element to read a collection of CSV files from a directory and then store the data into a single RowSet variable. The CSV files must be uniform in data structure, and each CSV file must contain the same number of columns and the columns must be of the same data type (such as VARCHAR or INT). When the Read CSV task has been processed, the output RowSet variable can be used as the input RowSet variable for a write task, such as Write to Excel, or SQL.
Follow the steps below to read a set of CSV files:
  1. From within the Project Designer page, expand the Data Translation folder in the Component Library, and then drag the Read CSV task to the Project Outline.
  2. On the Basic tab of the Read CSV task, specify the value for Output RowSet Variable. The output RowSet variable will contain the combined data read from each file in the File Set.
  3. Click the
    Add
    button, and then Add a File Set.
  4. On the Basic tab, specify a Base Directory that contains CSV files.
  5. Click the
    Add
    button, and then Add a Wildcard Filter element to the Read CSV task.
  6. Wildcard Filter elements do not contain any attributes to change. Click Next to add an Include Files element.
  7. Enter a wildcard Pattern on the
    Basic
    tab. In this example, "*.csv" is used to only read files that end with the CSV file extension.
  8. Click Save. When the Read CSV task is processed, the data from each CSV file in the File Set is stored into a single RowSet variable.

0 COMMENTS

We’d like to hear from you!