community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Read from back-up database is main database is not available

 

Hi all,

I have the following scenario. I have two databases, say Main and Shadow. One of these is a copy of the other. Lets say Shadow is a copy of Main.  If  Main goes offline for any reason (I get an error in reading from it) then how can I easily switch to reading from the Shadow database. For example, a workflow that captures the logic below. Obviously this flow won't work but can anyone suggest how to solve this problem. 

 databsase workflow.JPG

 

 

Alteryx Certified Partner
Alteryx Certified Partner

@martinogorman,

 

You are SOOOOO close.

 

1.  append the count of records (APPEND tool) to the READ results.

2. filter the data for Count = 0 to go to the in-db process.

 

3. Take a coffee break.

 

I would consider using a dynamic input and updating it.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.

@marqueeCrew

 

 

Thanks Mark,
I am not sure your suggestion would work. I can't replicate a database being down but I can make the database call return an error so I think this represents the same scenario ( I simply provide fake credentials). The problem when a database read returns an error is the flow stops at that point. It would be great if the tool had a second output stream in cases of errors to make error handling easier. Below is an updated flow - stripped down to the essentials. AS you can see, there is no streaming of data from the first DB read so the Count tool isn't hit. I have tried testing Count = null and count = 0 but the problem is the flow stops on a DB error. By the way, the tag in the filters below should read "If record count != 0"

 

database workflow update.JPG

 

 

As an alternative, I tried the following. Obviously the issue here is having to read from Shadow even if the first read succeeds. But as the read fail from database A fails, the flow stops. 

 

database workflow update 2.JPG

 

Any ideas?

Labels