Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

getting error when a column is missing from the source

ayush_mishra
8 - Asteroid

I am getting an error because a column is missing (was available during development) from the source. I am using this column in multiple tools. My source file may or may not have this column. Is there a way for Alteryx to check for e.g. IF column A exist use it else create column A?

 

I also created two containers (thinking this would solve my problem),

Container 1 will be executed if column A is missing and container 2 will be disabled.

Container 2 will be executed  if column A is available and container 1 will be disabled.

 

But there are few challenges. This requires User intervention. User needs to decide which container to execute which leads to 2nd problem that is that User doesn't know if source has column A or not without executing.

4 REPLIES 4
patrick_digan
17 - Castor
17 - Castor

@ayush_mishra I would use the ensure fields macro in this case. It's part of the CREW macros. If you don't want to use the macro, I laid out what it's doing in this post recently. The idea is to have a text input with Column A and no data and union that with your data. That way the metadata can flow correctly.

HomesickSurfer
12 - Quasar

Edit: @patrick_digan , posted similar just before I did.

 

Hi @ayush_mishra 

 

Keep it simple.  Here's my efficient approach.  Attached.  Extract to C:\Temp

Use a 'field loader' and Union all by name.

 

Capture.PNG

 

ayush_mishra
8 - Asteroid

thanks @patrick_digan@HomesickSurfer for looking into it. You guys made it look easier.

HomesickSurfer
12 - Quasar

Happy to assist 🙂

Labels