Skip to main content
Solved

using Choice user parameter in AttributeKeeper


Forum|alt.badge.img

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)

Best answer by virtualcitymatt

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.

View original
Did this help you find an answer to your question?

2 replies

gazza
Contributor
Forum|alt.badge.img+6
  • Contributor
  • July 3, 2023

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.


virtualcitymatt
Celebrity
Forum|alt.badge.img+34

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings