Alteryx Designer Desktop Discussions

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

Copying a column from one input and pasting it into another

grsomer
8 - Asteroid

Hi!

 

I am trying to put together a workflow using two inputs/files. I want to copy a column from sheet 1 and paste it over the data in an existing column in sheet 2. I only want to paste certain columns and do not want to bring in any additional fields from sheet 1. Is there a way to do this?

 

Thanks in advance!

6 REPLIES 6
afv2688
16 - Nebula
16 - Nebula

Hello @grsomer ,

 

The way to do this would be using the join tool. Select the columns that match within the two inputs and after select the ones you need.

 

For example: Left input (input1) has all the fields you need and the right input (input 2) has the information you need from only 2 colums (b and c). Then use the select within the join tool fto deselect every field from the right input except fields b and c.

 

On the other hand, if the information you need is just a row and want to add it directly I would recommend then to use the append field. Be careful since the information will be multiplied having more than 1 row to union using this tool.

 

For example: You have 5 rows on the input 1 and 3 on the input 2. The amount of rows will be in the end 15 (each row of input 1 having the information from input 2)

 

Cheers

grsomer
8 - Asteroid

Hi @afv2688!

Thank you for your help! However, the issue that I am having with the join tool is that I don't need the data from both inputs to match, I just need to replace the data from one input with the data from another. When I use the join tool, I am having some of the data left out of the join because it does not match any values in the other input. Is there a way to simply replace the data in one field with data from another?

afv2688
16 - Nebula
16 - Nebula

Hello @grsomer ,

 

You could use the Find replace tool for that. Select the colum you want the data to be replaced and set a match with a colum from the other table. You can also append the data to the field instead of replacing it.

 

If you can give me a little sample of your data or if you can creat some dummy data which represents what you want to do (both inputs and desired output) I may be able to do it for you without a problem.

 

Cheers

grsomer
8 - Asteroid
 
danilang
19 - Altair
19 - Altair

Hi @grsomer 

 

To replace a column of information with another, join on record position.  In the join select all the columns from table 1 and the columns from table 2 where you'll be getting the replacement data.  This will give you a set records with all the relevant columns from both data sets.  Then you use a Select tool to remove the original columns and rename and reorder the remaining columns.

 

Before you do this you need to ensure that the records from both tables match. i.e the data from table 1 record x can be replaced with the data from table 2 record x for all records.

 

Dan 

danilang
19 - Altair
19 - Altair

Hi @grsomer 

 

To replace a column of information with another, join on record position.  In the join, select all the columns from table 1 and the columns from table 2 where you'll be getting the replacement data.  This will give you a set records with all the relevant columns from both data sets.  Then you use a Select tool to remove the original columns and rename and reorder the remaining columns.

 

Before you do this you need to ensure that the records from both tables match. i.e the data from table 1 record x can be replaced with the data from table 2 record x for all records.

 

Dan 

Labels