Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Deselecting columns due to a separate list of columns to remove

paddykav
7 - Meteor

Hi all,

Hopefully someone can help.

I have a very large data set but need to deselect columns based on another data input.

I need a way to automate this in the workflow without manually using the select tool since the similar thing needs to be done on many datasets. Please let me know if this can be done?

 

RowABCDEF
112DuckDDjlkj67ty00
213CowDDlkjlk78gh 
312FoxDDkjlk89hg 
413HenAAkjlkj56f 
514PigAAkjk45df 
615DogAAlkjlk5fg99
712CatFFkljl7vb100

 

 

Separate data source that commonly changes:         Columns to exclude from report if present

B

E
X
Y
Z
7 REPLIES 7
AngelosPachis
16 - Nebula

Hi @paddykav ,

 

I can think of two ways you could do that. The first would be with a dynamic select tool, where you type the columns you don't need in an in function.

 so

 

 

[Name] NOT IN ("B","E","X","Y","Z")

 

 

The other way would be to transpose your dataset and then  join it on your data input tool, but this is probably not the way to go if you have a very large dataset

 

AngelosPachis_0-1613667649997.png

 

Hope one of the two ways work for you.

 

Cheers,

 

Angelos

 

paddykav
7 - Meteor

Thank you but typing it in isn't an option here since I need to do this many times with different data sets and the columns to exclude will change based on the secondary input of columns to exclude.

And yes, since the data set has many millions of rows it's not suitable to transpose 

AngelosPachis
16 - Nebula

Hi @paddykav ,

 

Another alterative would be to use a batch macro, where you feed in the control parameter of the batch macro the fields you want to exclude and that dynamically updates the values in the In function of the dynamic select tool.

 

So your input is 

AngelosPachis_0-1613670540603.png

and the fields you want to exclude is

AngelosPachis_1-1613670563299.png

 

You have to bring those fields in the correct format to be fed inside the In function. You can use a summarize tool to do that.

AngelosPachis_2-1613670715454.png

 

That's fed in the control parameter and inside your batch macro, you have a single dynamic select tool where you dynamically update the column values to be excluded

 

AngelosPachis_3-1613670817520.png

 

In your output, you should get the desired outcome

 

AngelosPachis_4-1613670850833.png

 

Hope that helps,

 

Angelos

 

AngelosPachis
16 - Nebula

@paddykav tested it as well in a different dataset

 

Batch_2.gif

paddykav
7 - Meteor

Thank you very much👍. This looks very promising 

I tried to download the flow but it won't open for me since it says it's build using a more recent version and I'm stuck with v2020.3 for now and can't upgrade since that's what my server is at. I'll try tomorrow to download a second version of Alteryx to my PC with the latest. You must have built it on 2021.1?

AngelosPachis
16 - Nebula

Yep, but I have also attached version 2020.3 in this comment since this is your server version

 

Let me know if that worked for you.

 

Regards,

 

Angelos

paddykav
7 - Meteor

Thank you very much. I was able to open this file and work with it.

This solution is definitely getting me to where I want to go

Labels