Start Free Trial

Alteryx Designer Desktop Discussions

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

How to join two tables

Ashwin_99
6 - Meteoroid

Hi All, 

 

I need a help in pulling the information from one table to another table.

here is my 2 input tables.

Table 1:

Node NameCityCountry
A1TokyoJapan
B1ParisFrance
C1New York CityUSA
B2LondonUnited Kingdom
C2BeijingChina
B3MoscowRussia
C3SydneyAustralia
P1CairoEgypt
Q1Rio de JaneiroBrazil
Q2IstanbulTurkey
Q3MumbaiIndia
R1BerlinGermany
R2TorontoCanada
R3Mexico City

Mexico

 

Table 2:

IDNode NameChild 1Child 2
1A1B1C1
2A1B2C2
3A1B3C3
4P1Q1R1
5P1Q2R2
6P1Q3R3

 

Expected Output:

IDNode NameCity1Country1Child 1City2Country2Child 2City3Country3
1A1TokyoJapanB1ParisFranceC1New York CityUSA
2A1TokyoJapanB2LondonUnited KingdomC2BeijingChina
3A1TokyoJapanB3MoscowRussiaC3SydneyAustralia
4P1CairoEgyptQ1Rio de JaneiroBrazilR1BerlinGermany
5P1CairoEgyptQ2IstanbulTurkeyR2TorontoCanada
6P1CairoEgyptQ3MumbaiIndiaR3Mexico CityMexico

 

Thanks in advance,

Regards,

Ashwin_99

5 REPLIES 5
TimN
13 - Pulsar

Maybe something like this...

Hello, tried to make your workflow, hope this helps you. 

Ashwin_99
6 - Meteoroid

Hii Folks,

 

Thank you for your response it was really helpful,

But i have a question, if in case we have children more than 2 then i dont this this workflow will run,

Can we make it dynamic to handle the issue when we get more than 2 childs

Thanks

 

Happy learning.

Regards 

Ash 

yes we can make it dynamic; do you want me to create that or just need the overview how we can make it

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @Ashwin_99 ,

 

I tried to make it dynamic.

I hope this helps.

 

The field names were a bit tricky as the same seq number does not always related to the same node.

You can modify the formula tool to adjust field names as you like.

 

Workflow

1262787_Workflow.png

 

Output

IDNode NameCity1Country1Child1City2Country2Child2City3Country3Child3City4Country4Child4City5Country5Child5City6Country6
1A1TokyoJapanB1ParisFranceC1New York CityUSAX1City X1Country X1Y1City Y1Country Y1   
2A1TokyoJapanB2LondonUnited KingdomC2BeijingChinaX2City X2Country X2Y2City Y2Country Y2   
3A1TokyoJapanB3MoscowRussiaC3SydneyAustraliaX3City X3Country X3      
4P1CairoEgyptQ1Rio de JaneiroBrazilR1BerlinGermany      Z1City Z1Country Z1
5P1CairoEgyptQ2IstanbulTurkeyR2TorontoCanada         
6P1CairoEgyptQ3MumbaiIndiaR3Mexico CityMexico         

 

Labels
Top Solution Authors