We have a orders table and a contacts table. The contacts table has close to a billion records. These two tables are in two different DBs
I need to select orders based on a criteria. Then for each order, I need to lookup the contact record(s) by contact_id. There is a many-to-many relationship between the two tables
One option is to select the orders by criteria and then pull ALL the data from the contacts table, and then perform a join using the join Join Shape. This works, but takes forever, especially if the contacts data is not cached. We can not cache the contacts data as it being constantly updated.
We only select ~1000 orders at a time, so using the Join shape create a huge overhead.
Is there a better way to implement this?
Solved! Go to Solution.
I've been meaning to set this up for a while, so I thought I'd do it now for you :)
Part time Tableau, Part Time Alteryx. Full Time Awesome
Hello,
Thanks for the suggestion. This is an awesome solution.
This works, but only when the WHERE IN clause is only few hundred contact ID. Beyond that Alteryx throws a Unhandled Exception. Now sure why.....
Still hitting the field size limit for the concat on the crosstab shape. Looks like the max field size for that is 2000000000
Here's what I was talking about
Part time Tableau, Part Time Alteryx. Full Time Awesome
Hi,
Yup, I underestimated the amount of data we are getting from the Orders table. So I have created a batch macro that is processing 1000 records at a time. :)
Saqib