Hi friends
Imagine the following scenario:
In a folder, I have three files with the same layout, but each belong to different companies. I know that I could configure the “CsvReader” to read the folder, and the node would automatically group all the files, meaning it would read all three files at once. (Print 1)
print 1
files in folder
The initial number are the companies “code”
However, imagine that I want to configure it to read only two files from the folder instead of all three. In other words, I want to create a custom group and specify only the two files I want to read.
I know that in the Csv Configuration exists a Filter option to filter by file name.
But I need to filter “one” or “more” files, bases in the group definition.
Here’s the model I’m creating:
Step 1) I created an Excel file containing all existing company codes and a column defining which ones will be part of the reading group. (Print 2)
This column is the group by companies to use “like” a group loop.
Step 2) I used the “List Files/Folders” node to read all the files in the folder so I could identify their names and perform a JOIN to bring in the group column.
This shows 3 files and the group column
Then I use a group loop node to loop by group
Now I have only two files to read and append on reading
But here’s is the step that I’m stuck.
How to read only the two files if my configuration window requires using a variable to read the folder and filter the desired files?
My expectation is for the result to show only two files, read them, and then start another group until the end.
It’s possible?
workflow until here