Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Is there a way to overwrite existing records with updates when appending to an Excel file?

patrickprentice
8 - Asteroid

My workflow requires me to pull in and output data that's organized by date and saved in individual files based on the month and year in the record. I have an output that dynamically creates a new file for new months or if a file for that months exists already it appends the new records to it. The appending side of things is where I'm having trouble.


One of my outputs has a summary of the data I have pulled in, summarized by day. Because I'm running this workflow in the middle of the day I'm getting half of a day's worth of data output into my file. If I run it again the next day I'll have the full info for the previous day but it'll create another record in my workflow.


To avoid getting duplicate records I am using a join tool to pull in the records that are in the file already, joining by date, and only appending dates that aren't matched but doing it this way means that previous day's data isn't going to get overwritten like it needs to be.

 

Annotation 2023-03-06 154913.png

Obviously, I could just run the file through another workflow with a unique tool in it but I want to keep our server footprint as low as possible.  Right now my solution is to filter out the current day's data before it goes to the output but that's just a bandaid since there are times when the current day's data might be requested.

 

Anyone have any ideas?

1 REPLY 1
patrickprentice
8 - Asteroid

Update:  I changed things a little bit on the workflow and it appears it works well this way:

Annotation 2023-03-07 083351.png

 I'm now joining on the left side so that just the left side data is what is going to the file.  Instead of appending I'm overwriting the entire sheet.  I'm not sure if I need the union and unique there at all but I'm going to keep playing with it and see if I can break it.

Labels