Skip to main content

Dear All,

 

I have the following setting : I've created a User parameter of type "choice" where the user can tick which attributes he wants to keep and send to the Writer (column1, column2, column3, etc.).

 

With the MultiChoiceParamSplitter followed by a ListExploder, I can get a table where the attribute "_choice_param_values" holds the attribute names the user has selected (e.g. column1, column3), but how can I use it then in the AttributeKeeper (or any other transformer that would do the job) ?

 

I've tried to pass the table as input with "_choice_param_values" as Attributes to Keep but it does not work at all...

 

Or maybe, from the outset, I didn't tackle the issue from the right angle and you have suggestions about how I could I achieve what I want in a totally different way around ?

 

Any ideas are welcome, as I've run out...

 

NB : I've seen the (seemlingly related) post below but it did not solve my issue.

Having trouble passing user parameter multi-attribute to transformers with attributes to select (safe.com)

The attached workspace may give you some ideas, although it is about removing attributes rather than keeping them. It creates a regex string of attributes to remove and passes that to a BulkAttributeRemover.


You can try and create the parameter directly from the transformer itself:

 

image 

This works but you will need to take care because the schema gets completely removed in the process.


Reply