Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How to Union with non-existent table

Peachyco
11 - Bolide

Hi. I'm having an issue with the Union Tool having no output if any one of its inputs is completely non-existent.

 

This is my scenario:

  1. I'm reading data from an Excel file. Sometimes, the columns will be properly named, and sometimes not.
  2. My solution is to introduce a column that identifies if the column names are proper or not. That's what the Filter Tool is checking for in the pic below.
  3. If the column names are improper, I go to a Dynamic Rename Tool to use the first row as the column names.
  4. If the columns are not properly named, the workflow finishes perfectly.
  5. The problem: If the columns are properly named, a blank table (table with headers but 0 rows) comes out of the F-output of the Filter Tool, but no output comes out of the Dynamic Rename Tool. It's not a blank table - it's just nothing. You can see this in the Results tab in the screenshot below.
  6. Because the Dynamic Rename Tool has no output, the Union Tool also produces no output even if it is receiving data from the other input (the T-output of the Filter Tool), effectively stopping my workflow.

Alteryx - Union Problem.png

 

Any advice would be much appreciated. Thanks a lot! 😊

3 REPLIES 3
DataNath
17 - Castor

Hey @Peachyco, how is your union configured? Some of the configurations (such as Output a Common Subset of Fields) rely on the 2 schema being identical which wouldn’t be the case if you have a blank output from the Dynamic Rename.

 

EDIT: Realise this wouldn't work, sorry.

 

The below should do what you're looking for - all you need is a lookup table (going into the right hand side of the join) with what the correct headers should be (in order) - all it does is transpose your current headers, assign their position and then match that position against your lookup table before renaming them as required. If your headers are already correct, they'll be maintained. If they're incorrect, they'll be changed:

 

DataNath_0-1655450359946.png

 

grazitti_sapna
17 - Castor

@Peachyco, can you provide us a sample input and output of the requirement if possible?

 

Thanks!

Sapna Gupta
Peachyco
11 - Bolide

@DataNath : Thanks a lot for the advice! 😊 While it's not the complete solution, the principle/design behind your proposed solution served as the foundation for the solution that I eventually ended up with.

 

So, instead of introducing a fork in the road - with one path performing the Dynamic Rename - and then using Union to bring those paths together again, I now have just a single path that goes through the Dynamic Rename, changing the column names only when necessary.

Labels