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

Alteryx designer Discussions

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

Iterative Data pull from database

Hi,

 

I am trying to iteratively pull data from the database based on a condition. I have a column in my database table which has the total number of records for that particular ID i am tyring to pull data for and hence would like to use that to pull data iteratively and build a table with text appended on each page of the table.

 

Appreciate any form of help.

ACE Emeritus
ACE Emeritus

Hi Santosh,

 

Not knowing the details, my recommendation would be to try to avoid database iteration if possible, if it inolves connecting to the database and then releasing that connection only to reconnect at tthe next iteration.  That will have very poor performance if there are a lot of itereations.

 

If you can provide more specifics we may be able to provide more detailed suggestions pertinent to your specific problem.

Meteoroid

Hi Santosh,

 

Have you considered coming at this from the database side?  You could set a trigger that monitors this condition and then run a proc that creates a file for Alteryx to pick up.  Triggers like this are pretty non-invasive (since essentially you are monitoring a condition and only firing when condition meets the criteria) and allows the database to do the work.

 

You could then be monitoring a file store for the file - and this would eliminate the overhead of continually connecting and checking - or if you know the cadence of the data could this just be an output you need to read from some X number of times a day.

 

Hope this helps,

 

Matt

 

 

 

I am trying to generate a report which has both text and multiple tabular data. For each of the tablular data, a particular text(sort of like a legend) which has corresponding data from the database needs to be appended. If the table goes beyond a page, on each page this text needs to be appended. Currently i am using a batch macro to achieve the same, but the problem i have is i currently create the table and legend text seperately and hence the text gets appeneded only on the first page. Hence was wondering if i can iteratively pull data i can append the text for each page.

 

The following will give you an idea of what i am trying to achieve,

 

Name: Santosh                                                                                                           Gender: Male

Age: 18                                                                                                                       Software: Alteryx

Location: USA                                                                                                            Address: Chicago, IL

 

 Sno 1 2 3
 1 scas asfasf  asfasf  asfasf  asf asf
 2 asf asf asf asf asf asf saf asfaf 
 3 asfasf  asfasf  asfasf  asfasf  asf

 

 

In the above example i will need to append the text for every page the table continues besides the first page that i currently do. I am kind of new to Alteryx and hence would appreciate any help or suggestions to achieve this same. Also i use alteryx 10.1 to generate this report.

ACE Emeritus
ACE Emeritus

Could you manipulate the data prior to the reporting tools, such that the data is organized in segments corresponding to single pages? e.g. for any particular subset of the data that might run-over onto a second page (which I'm hoping you can determine based on number of rows for that particular subset); break that subset in two subsets, (e.g. using a multirow formula to assign a "SubsetPageNumber" for that particular subset)... then later, when setting up the report, you can add field that as a final layer to your grouping, thus hopefuly never encountering the run-over since you've now limited the number of rows.

 

That's an idea anyway... not sure if it applies well to your particular situation. Hope it helps.

 

Yes thats exactly what i am trying to achieve but couldnt get it right. Would you be able to give me an example of it, as i am pretty new to alteryx and have limited knowledge of this?

 

Thanks,

ACE Emeritus
ACE Emeritus

I've attached a workflow that calculates the "SubsetPageNumber" and uses it to split pages in a simple table.  Hope it helps!

Hi John,

 

Thanks a lot for the response, but i am unable to open the workflow as i have an older version of alteryx(10.1). Would you be be able to downgrade the workflow version or something?

Highlighted
ACE Emeritus
ACE Emeritus

Oops - forgot about that.  If you open it in a text editor, you can modify the first line in the file and change the "10.5" to "10.1" in order to get it working on your machine.  PS, there's also a cool macro to help with this common issue: https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Dealing-With-New-Version-Workflows-Before-Yo...

Hi John,

 

Thats exactly what i was looking for to help me build my solution. Thanks for the help. Appreciate it.

Labels