Alteryx Designer Desktop Discussions

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

Macro to process one column at a time

trevorwightman
8 - Asteroid

Hi All,

 

I have a file with millions of records and hundreds of columns. I need to summarize each column within this file to determine which values are found in each column and how many times each value is found. This is quite a simple on few records by using a transpose tool and a summarize tool (example attached). However, I am running into the problem of the transpose and summary taking forever and the machine running out of memory since there are so many rows and columns. I was thinking there should be a way to make a macro with a dynamic select tool that, for each iteration of the macro, it grabs one column, does the transpose and summary and outputs the results. Then it does the next column and so on and so forth until it has processed all columns. I have not been able to figure out exactly how to configure this.

 

Any ideas?

 

The output I am looking for is the browse tool in the attached workflow, but instead of doing it like this I need to process one column at a time via a macro.

2 REPLIES 2
DataNath
17 - Castor

Hey @trevorwightman, sounds like you could do this by using a batch macro. All you'd need to do is pass the list of header names to your control parameter (upside down question mark), which you could get by doing a transpose and summarize to group on 'Name'.

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Getting-Started-with-Batch-Macros/t...

 

What this does is then run an instance of the macro (which would be very similar to your current example workflow) for every group of records matching those in your control parameter list. Note: You'll need your regular macro input to be the transposed format of your dataset.

binuacs
20 - Arcturus

@trevorwightman one way of doing this 

binuacs_0-1655330555914.png

 

Labels