Free Trial

Alteryx Designer Desktop Discussions

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

Are there any inbuilt alteryx functions to list the names of columns?

Lalith27
6 - Meteoroid

Hi,

I have a workflow where sometimes i may not get all the required columns that i need.
I need to have all columns for the data to get uploaded successfully to downstream platform.

Scenario: My API yielded 7 columns like Created_date, event_name, event_id, form_name, event5, event6, event7
But sometimes i get columns missing and i will get only 4/5 cloumns.
So I want to find what are the columns that are missing and create those columns dynamically with null values.

I don't see functions/ways to extract the output column names and to dynamically create a missing column name by comparing the output name with above list.

Appreciate any help on this.

Thank you


6 REPLIES 6
DavidSkaife
13 - Pulsar

Hi @Lalith27 

 

The Basic Data Profile tool can get this for you, in conjunction with the Select/Unique tools and a Join to a master list of fields. Please see screenshot below and the attached workflow

 

Capture.PNG

 

You could then use this to create the column that was missing.

 

Edit: Expanded it to include adding in the missing column(s) which also includes a control column for when all original columns match - see revised workflow

 

Capture.PNG

JosephSerpis
17 - Castor
17 - Castor

HI @Lalith27 as well as the suggestion by @DavidSkaife you can also use the Field Info Tool to get the list of the column names. 

Raj
16 - Nebula

You can Use data Profile tool to get the Information Of Columns present and then you can easily compare them with your standard Columns,

CoG
14 - Magnetar

Other much sneakier way to get all columns: Union Tool will add columns based on standard list (with all nulls):

_Main.png

Tam
9 - Comet

HI @Lalith27 

If you know exactly the columns required, then appending the API output to the template should add the column and place null in the field missing. 

HTH 

 

Tam  

Lalith27
6 - Meteoroid

Thank you very much David! It worked.

Labels
Top Solution Authors