Tried this several times but no luck. Currently, I have too many variables:
$mont_nbr $month_name $person_nbr $person_name (and a few more...)
In several cases I need the names, in other a number and so on. The idea is that I need all these variables throughout the workbench.
The thing is, if I have excel data like:
01 | January | 240 | Mike |
I would like the user to input the month_nbr (in this case, 01) and then bring in the other variables from the excel table., as for 01 it will always be January, 240 and Mike as the variables.
I am trying to find a way to ease the user input process. I Looked at the workspace runner but I just cannot make this work.
Best answer by takashi
Hi Robert again,
Two approaches have come to my mind. assume the Excel table has 4 fields: Month Nbr Month Name Person Nbr Person Name 1. Using the WorkspaceRunner 1) Define 4 published parameters - e.g. month_nbr, month_name, person_nbr, person_name - in the main workspace. 2) Create another workspace and define a published parameter - e.g. month_nbr. 3) Read the Excel table, select a record whose "Month Nbr" is matching with the parameter value ($month_nbr), pass the field values of the record to the main workspace as parameters and execute it through the WorkspaceRunner.
2. Using the Joiner 1) Define a published parameter - e.g. month_nbr - in the main workspace. 2) Add the parameter value to features as an attribute through the ParameterFetcher. 3) Using the Joiner, read the Excel table and join features and the table record on the month number. Other field values (month name etc.) can be added to the features as new attributes.
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Two approaches have come to my mind. assume the Excel table has 4 fields: Month Nbr Month Name Person Nbr Person Name 1. Using the WorkspaceRunner 1) Define 4 published parameters - e.g. month_nbr, month_name, person_nbr, person_name - in the main workspace. 2) Create another workspace and define a published parameter - e.g. month_nbr. 3) Read the Excel table, select a record whose "Month Nbr" is matching with the parameter value ($month_nbr), pass the field values of the record to the main workspace as parameters and execute it through the WorkspaceRunner.
2. Using the Joiner 1) Define a published parameter - e.g. month_nbr - in the main workspace. 2) Add the parameter value to features as an attribute through the ParameterFetcher. 3) Using the Joiner, read the Excel table and join features and the table record on the month number. Other field values (month name etc.) can be added to the features as new attributes.
I tried the Joiner feature: creator->parameterFetcher->Joiner-> ??
It all came out like in the example but I cannot pass on the resulted values; The joiner cannot be linked to the reader (It does not allow that as the source dataset for the reader is a publised parameter). I need the values from the Joiner to be placed in the source path, not as an attribute.
So, based on _month_nbr I extract Month_name and person_name. Ok, I need those two to be yet again published params (aka $(month_name) and @(person_name))
These 3 variables should form the file path of the reader.
For that purpose, move those transformers to another workspace and call the main workspace through the WorkspaceRunner: Creator->PrameterFetcher->Joiner->WorksapceRunner
In addition, you can also create a path string by concatenating the attributes beforehand and pass it to the main workspace as a parameter (source path).
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.