We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Possible In-Database solution for a Workflow

ctackett
7 - Meteor

I created a workflow and it seemed to work fine until I received feedback that there was some logic missing; however, I'm still really learning more advanced solutions in Alteryx so I'm hit and miss on all the features Alteryx can do, but I'm learning.  Hence, me asking a lot of questions. :) 

 

I'm sure if I rattled off the entire process I'm doing, it can probably be done in Alteryx but right now I'm doing pieces of it, that I know, can be done in Alteryx and doing the rest in GoAnywhere until I learn if it can be done in Alteryx.

 

After I get this working , I might sit down and see if I can put it all in Alteryx so it can be centralized.

 

Anyway, here is my current workflow and then my challenge and what I'm thinking might work, but not exactly sure. 

 

 

 

Before the Data hits the Master Table at the end I need it to do the following logic

 

Check if the Primary Key Exists in the Master Table

 

  • If the Primary Key exists in the master table and the total ItemsOrdered column equals 0  then Delete the rows that contain that Primary Key and Insert the New Data from the .csv
  • If the Primary Key exists in the master table and the total ItemsOrdered column does not equal 0 then Do Nothing (this will just do nothing with the .csv file)
  • If the Primary Key does not exist in the Master Table then insert the data into the Master Table.

 

I'm thinking to do this  I'm going to have to use one of the In-Database Options, but I'm not sure which one, I've been trying them out to find out if one would work but not seeing a solution so figured I'd ask.

 

 

 

 

1 REPLY 1
TimN
13 - Pulsar

 


I'm thinking something like the mock up pictured.  When writing to the Master table, choose output Options = Update: Insert If New.  This assumes you are writing to a database, you have permission to write and the Master tables's primary key is defined.

Labels
Top Solution Authors