Alteryx Designer Desktop Discussions

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

How to manage if columns needed on steps to be modeled, are not in my input file?

VictoriaBuet
6 - Meteoroid

Hi community. Does anyone have experience or ideas on the following scenario:

 

- With aim to automate the modelling of an excel sheet, I am building a template to model questions for a survey 

- This survey contains multiple questions inside. But always almost it happens that clients choose some questions, and not all of them 

- So, the modelling will be different for each client.

 

 I have the general template taking into account all questions. But, given the explained above, how can I then manage if a client chooses only some questions? Is it possible in Alteryx to say: if these columns (questions) are not in input file, then don't do this step or create this columns with null values (which are questions the client didn't choose to ask).

 

Using an action to enable/disable certain flows is not possible, because the general template will have at least 200 columns, user can't choose which columns to model.

 

Thank you!

4 REPLIES 4
SPetrie
12 - Quasar

Create a Text input will all default fields but no rows in it.

Union that to the actual input data. Any fields that are not in the input data, will be null columns.

SPetrie_1-1649452922879.png

 

SPetrie_2-1649452950438.png

 

SPetrie_0-1649452896747.png

 

T_Willins
14 - Magnetar
14 - Magnetar

Hi @VictoriaBuet 

 

I have used a Text input tool as a template to format the data that arrives incomplete.  Attached is a sample workflow that shows how I have done this.  I used the batch macro to bring in all the files at once and overcome the error that arises from schema differences (missing fields).  You may not have this issue, so you may be able to use a simplified workflow.  The data is then combined with the template using a Union tool.  A Sample tool is used to remove the template data, leaving you with your required data 

 

Template.png

 

VictoriaBuet
6 - Meteoroid

Thanks! This worked perfectly :)

VictoriaBuet
6 - Meteoroid

Thanks!! This worked perfectly :)

Labels