Alteryx Designer Desktop Discussions

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

Database upload

praneshsapmm
8 - Asteroid

Hello there,

 

I have this requirement of loading data into DB everyday using spreadsheet / other DB . 

 

How can i make sure that all the records from input source are written into DB  .

 

Is there a way to find via workflow . 

 

Thanks.

10 REPLIES 10
Tiffyyy
Alteryx
Alteryx

@praneshsapmm you can use the "test" tool to perform row count check: https://help.alteryx.com/current/Test.htm

 

IraWatt
17 - Castor
17 - Castor

Hey @praneshsapmm,

The data input and output can read and write to databases and excel. You'll just have to format the data in Alteryx to ensure all records are in a structure your database can handle:

IraWatt_0-1654775290477.png

The row count tool can be used to double check all records are there like this:

IraWatt_0-1654775886147.png

 

 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @praneshsapmm!

 

Did this resolve your issue? If not, will you kindly provide more details?

praneshsapmm
8 - Asteroid

Hi @ddiesel ,

 

I am trying to use test tool . My requirement is to reconcile if all the lines loaded into DB successfully once the main workflow is executed . 

 

For example : 

 

# of lines in DB before load  : 100

# of lines ready to load : 50 

 

Ideally if all loaded # of lines in DB : 150 .

If it is not 150 then user should receive an eamil .

 

Not sure how to check this .

 

THanks

apathetichell
18 - Pollux

database isn't very clear- what is the source database - and approximately how many records are we talking about? I'd accomplish what you are trying to do via an select count * from ... statement (probably in-db) and then use a datasream out to get that onto canvas. I'd include that number vs the number I was looking for (so perhaps one count pre-write and one count after writing) and see if the delta matched the number of rows added. That would trigger an e-mail.

 

 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @praneshsapmm!

 

Can you provide more details about where the counts are coming from? Has there been some kind of issue where the counts do not match? If so, can you please describe that scenario?

 

If you are trying to get a record count from a database at the start of the workflow, and then a count after Alteryx appends more data, you will not be able to do that in one workflow. We can look at options to execute a 2nd validation workflow after the main workflow runs, or write the counts out to a log that you check before each run against the current record count.


Please send more details. I'm sure we can help figure this one out.

 

Thanks,
Deb

 

apathetichell
18 - Pollux

@ddiesel- What about something like this? Basically you use a few block until dones (you can use a parallel BUD  or create one). You take the count of records currently in the DB. A count of records you are updating. You update the DB. You trigger a new SQL query off the source and then get a count, and then you compare the two counts... POC at the next OC Meet up?

 

Screenshot (4).png

ddiesel
13 - Pulsar
13 - Pulsar

@apathetichell Yes, something like this! Block Until Done will be necessary for sure.

 

I snagged this for my notes for our next meeting. Good suggestion!

apathetichell
18 - Pollux

@ddieseldynamic input in-db is key because it allows ordering/triggering so you can make sure the connect in-db executes at the proper time. You could also use a batch macro to control that process - but I just love dynamic input in-db.

 

I can probably hook this up with some sample data in snowflake for a walkthrough at a user group meeting. Definitely more useful for folks who are heavy on the In-DB side of things.

Labels