Setting up variable file paths with constant key words

My company sends emails through a marketing platform that lets us download data for each campaign:

  • Opens, to see how many emails were opened
  • Clicks, to see how many links were opened
  • Bounces, to see how many emails bounced.

The data is downloaded as a CSV file. The name of each file contains the email campaign and the type of data. So, if we had an email campaign called “London Networking Event”, we can download:

  • London-Networking-Event-Opens.csv
  • London-Networking-Event-Clicks.csv
  • London-Networking-Event-Bounces.csv

We use a KNIME workflow to transform these CSVs. Currently, we have to manually update each reader and writer node to point to the right file in the right folder. This gets frustrating after a while.

At the start of the workflow, we would like to be able to select the folder and enter the email campaign to save time. In theory, it would work like this:

  1. Use a Local File System Connector node to select the folder
  2. Use some other node to enter the email campaign name (so, like in the example above, “London-Networking-Event”
  3. Concatenate 1 and 2 to get the start of the file path
  4. Set each reader node to add “-Opens.csv”/“-Clicks.csv”/“-Bounces.csv” to the file path

How could we achieve this?

Many thanks!

@mac95 how about you provide a general path where to search and then have three search nodes for the variants and when there is a match for a prefix (name) and three extensions, then you provide that as a possible campaign name and when that is selected you load the data. All in a nice Data App:

The inner workings of the Data App would extract the campaign names automatically. If this is how the files are always structured. And in this case they have to be in the same sub-folder.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.