In [2]:
%autosave 10
!!AI so if this is PL/Python on the database side, could you use pandas pandas.read_sql to execute it then return results? I guess so.
Since you want to join or use data across tables, each maybe on different nodes, it's important to figure out how you split data depending on how you wantt o subsequently join it.
If you split by customer name, but then need it by order ID, always hitting multiple nodes.
If instead you split by customer ID, and all orders for that customer tend to live in same servers, avoid multi-node hits.
So when they go to customers ask "how do you use data? what queries do you need?" in order to speed up joins.
In [ ]: