Icon

Exercise4

<p><strong>Chapter 7/Exercise 4</strong></p><p>In this workflow, we implement a <em>Table Row to Variable</em> loop to read multiple CSV files at once.</p><p>The folder <em>KBLData/sales</em> contains multiple CSV files containing sales data. Each file represents one column of a larger dataset. We want to read each dataset and append it back into a bigger dataset. We start by manually creating a data table with the column names (represented in the file names that we want to access). Inside the loop body, we process the data row by row to create the individual file path to each file. We collect the intermediate results with the <em>Loop End (Column Append)</em> node.</p><p><strong><em>Note.</em></strong> You can use the List Files/Folders node to generate a list of file paths contained in a selected folder.</p>
Annotations and comments
  • Workflow: Chapter 7/Exercise 4 In this workflow, we implement a Table Row to Variable loop to read multiple CSV files at once. The folder KBLData/sales contains multiple CSV files containing sales data. Each file represents one column of a larger dataset. We want to read each dataset and append it back into a bigger dataset. We start by manually creating a data table with the column names (represented in the file names that we want to access). Inside the loop body, we process the data row by row to create the individual file path to each file. We collect the intermediate results with the Loop End (Column Append) node. Note. You can use the List Files/Folders node to generate a list of file paths contained in a selected folder.
  • Create list of files
  • Read file using path variable
  • Append files by columns into one bigger table
  • Convert string to path variable
  • List of column names
  • Get file name one by one
  • Generate file name for each file

Nodes

Extensions

Links