Hi,
I would appreciate some help. I have two inputs: Settings and a Dataset.
E.g.
Dataset
Trade ID | Date | MTM | Flav |
123 | 31.03.22 | 15 | Put |
312 | 31.03.22 | 10 | Call |
123 | 31.01.22 | 5 | Call |
Settings
Column Names | Action |
Trade ID | Group By |
Date | First |
MTM | Sum |
Flav | First |
[Column Names] in Settings contains all columns of Dataset and [Action] in settings determines the action the summarize tool should perform on the corresponding column. In this example we group by Trade ID, sum MTM, and take the first of Date and Flav:
Output
Trade ID | Date | MTM | Flav |
123 | 31.03.22 | 20 | Put |
312 | 31.03.22 | 10 | Call |
If the Dataset contains more columns, those will be manually added to settings including an Action before running the workflow.
I'm looking for a workflow that solves this dynamically, meaning the column names could change, there could be more/less columns or actions could change.
Best regards,
Y_B
Since you're wanting this to be dynamic, what rule do you want to follow for deciding what action is to be taken? (ie. first, sum, avg, group, whatever)
The action for each column is determined by [Action] in "Settings".
Maybe dynamic is the wrong word. The workflow should read the "Settings" and summarize the "Dataset" according to the settings.