Reading from CSV Files with Data Streams Step Types
- Updated2025-07-23
- 2 minute(s) read
Use the New CSV Input Stream step type to open a CSV file for reading and store a reference to it. In addition to specifying the path to the input file, you can specify a tag to search for and/or some number of lines to skip. These options enable reading from files that are not completely homogenous. For example, it is common for a CSV file to have metadata at the top (the date, time, operator id, location, etc.) followed by column headers, and then the main data table. The combination of scanning for a specific string and/or skipping a fixed number of lines allows the New CSV Input Record Stream step type to prepare such a file for reading with a for each loop. You can use the API to read more complex files.
You must close the CSV file when you are finished. You can close the CSV file by calling the InputRecordStream.Close() method through the API. Alternatively, you can configure the For Each step type to close the file automatically when the loop terminates.