Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Joins

abidsy
5 - Atom

Hi All,

I would like to know couple of things with respect to Joins in Alteryx,

 

1. Can we combine two excel files with same fields/attributes (Headers) in both file, one of the field will be measurable, so can we make out the difference by using the formula tool? file names would be slightly different but headers will be same, is this possible if yes, how?

 

2. does the number of rows in two files needs to be exactly the same to use Joins tool? getting an error stating stating no of fields are different when I checked I see a small differences in row count, any possibility to compare with difference in row count?

 

Thanks in advance!

Syed Abid

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @abidsy 

 

Could you provide a sample with dummy data for the 2 inputs and the expected output?

pmyers
Alteryx
Alteryx

Hi Syed,

 

It sounds like the Union tool will work for your example. 

 

pmyers_0-1663892217477.png

 

When bringing in each of your Excel files (before the Union), you can also set the "Output File Name as Field" option in the Input Data tool to output to a new "FileName" column that identifies the file name each row came from (to help keep things straight).

 

pmyers_1-1663892395796.png

 

Let me know if the above helps or if you have any additional questions.

 

Pete

Emmanuel_G
13 - Pulsar

Hi @abidsy 

 

For the first question, yes it is possible to vertically stack as many files as you want knowing that they have the same headers. To do this, you will use the Union tool and if the headers are indeed the same, it will work without warning and it does not matter that the filenames differ.

 

For the second question, if you have different numbers of rows between two databases, you won't have any problem in the join tool and that also applies to the union tool.

What will be a problem for the join tool is that the columns of the two databases have different data types. It is absolutely necessary to make sure to make the join between two fields of the same type (numerical or strings it does not matter but they must be of the same type)

 

Is that clear enough for you? 🙂

Labels
Top Solution Authors