Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!

Implement Update:Insert if new logic INDB

Highlighted
6 - Meteoroid

Hey Guys,

 

I need to implement Update:Insert if new logic when i am trying to insert records into the database table.I don't see this option when I use Write data In-DBtool .Is this even possible using InDB tools?

 

Any suggestion would be of great help.

Highlighted
Alteryx Certified Partner
Hey @rats

If you're trying to find new records you can use the join tool to identify records that exist in your new dataset that don't appear in current dataset and then insert those records.

Neil
Highlighted
6 - Meteoroid
Neil,
My problem is not the new records,I need a way to update existing records into the current dataset ie. If there are updates on the existing records I update those into my main table.

Sent from Yahoo Mail on Android
Highlighted
Alteryx Certified Partner

Hey @rats

 

Can you give me an example?

 

Neil

Highlighted
6 - Meteoroid

I have my master table where i have column as below

 

cust_Id Quantity

 

Now i receive my daily transaction table where lets say i receive 10 records.Out of this 5 customers already exists in my master table and 5 are new.So for new customer i can just append there records in my main table.But for 5 existing customers i need to updated the Quantity value based on data from today's transaction and update this records in my master table.

 

So basically i want to update existing customers with there new value.For this I do left join and can filter out records where right table is not Null and get customers which already exists in my master table.

 

No I need a way to append this records to my master table.

 

Let me know if scenario is still unclear

 

Highlighted
Alteryx Certified Partner

Hey @rats

 

Could you do something like this?

 

  1. Bring in your daily sales and summarize grouping by customerID
  2. Union this to your master table
  3. Re-summarize your data grouping by customer and summing quantity (this will update your existing customers)
  4. Overwrite your master table with the new data

Insert.PNG@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Labels