Alteryx Designer Desktop Discussions

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

How to Write Entire Rows into Another File to Replace Corresponding Rows?

Hello - new Alteryx user here

 

I'm trying to write rows of data from an 'updated' file into the 'master' file and have been getting stumped. For example, I'd like to write the two records from the 'updated' file to replace the corresponding rows in the 'master' file.

Ex:

'Master' file pre-process:

RecordData Element AData Element BData Element C
X145New York40-A
X224San Francisco50-A
X326Miami60-A
X487Los Angeles70-A
X598Dallas80-A

 

'Updated' file

RecordData Element AData Element BData Element C
X345London10-B
X5110Hong Kong10-Z

 

'Master' file post-process with the 'Updated' rows written in:

RecordData Element AData Element BData Element C
X145New York40-A
X224San Francisco50-A
X345London10-B
X487Los Angeles70-A
X5110Hong Kong10-Z

 

I've been trying to use the Join and Find & Replace tools, but haven't had success yet. I've gotten the Find & Replace tool to append the updated columns into the 'Master' file, but I don't know how to move those into the correct columns after that.

 

2 REPLIES 2
Luke_C
17 - Castor

Hi @christianpeterson20 

 

Here's how I'd approach this:

 

  1. Join the datasets based on the Record Column
  2. Only the 2 records being updated should come out in the J output. I de-select the old ABC fields and only select the new ABC fields.
  3. Then, I union this data back together with the records that did not join (aren't changing)

 

Luke_C_0-1621898066314.png

 

Luke_C_1-1621898080082.png

 

 

Thanks - that works!

Labels