community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Dynamically selecting columns based on config file

Atom

I have a database table contains 100+ columns and I have another configuration file that contains "source column name" and "target column name". I am trying to select columns based on the configuration file (My target table contains 75+ columns not all ). Also, I am trying to rename the columns based on config file.

1. Found a way to select columns using transpose and then join with config file to select columns and then cross tab the selected columns.

  --> Is there any better way to do this?  

2. Found a way to rename the columns using "Dynamic rename" option. 

Highlighted
Alteryx Certified Partner

Hi Sha,

 

I accomplished this with 3 controls:

 

  1. A Formula: to create the dynamic column (and rename) strings. Renames are not required.
  2. A Summarize: to concatenate the column names (with renames) into a single string
  3. A Dynamic Input: To modify the select SQL to reflect the column names and renames.

Here is a picture of the flow with comments and the flow is attached:

flow.png

 

I hope this works for you.

 

Labels