Yesterday I’ve had a great meeting with Alican Polat. Alican has got roughly 20 years of experience in the analytics industry!!! The spectrum he covers in this area reaches from architectural design, over SAP, Tableau and other BI front end as well as backend tools, too machine learning algorithms!
Today I’d love to quickly share an architectural design he came up with throughout this year. As a machine-learning enthusiast, he likes to code R and Python code at the same time. “Depending on the use case there are libraries out there which sometimes are faster in R and other times in Python” he says.
Based on Tableau’s documentation one could think that you can just use a single External Service like Python and R. The truth is, you can leverage both at the same time if you’re leveraging Alican’s architecture:
He set up TabPy to communicate with Tableau Server. TabPy is routing every R and Python function to Flask, which simply acts as a proxy. Based on a rules (e.g. naming conventions) Flask decides where to route the request to either R or Python before the result set does get send back to Tableau Server.
- Matlab is not used in their current environment and would be interesting to see if Flask could route requests to Matlab, too
- Julia (=”high-level, high-performance dynamic programming language for numerical computing”) could might be added to this architecture like Alexander Loth describes in his blog post
If you like this approach please leave a comment below and Alican Polat or myself will make a follow up post with more details about it.
Please do a follow-up!!! We are looking at incorporating TabPy in more of our reporting. Given we have people who are strong in both Python and R this looks like it would be great and I would love to see how you set-it up in more detail! (I’ve looked into Rserve and the inability to specify end-points compromises it’s power tremendously compared to TabPy as you can’t perform any of the necessary transformations within the script).
This certainly is interesting! What configuration or setup of Flask is necessary to get this setup? I got TabPy to work without issues, but other than that I’m rather unfamiliar with Python and the likes.
Really interested in learning more about this! Like Timothy, I’m curious how Flask plays a role in this system.
Is this suggesting that you would need 2 TabPy instances?
Hi Timo and alican, thanks for the article of hope. Are you able to share the link of detailed article like what does it to take to have it implemented practically.
Very interested to know the details please.
Many thanks in advance.
This will be really useful as R and python both are tremendously popular languages, we have users who want to use either of them and build their visualizations.
Although I would really want Tableau to provide some features on these lines as it would be easier to implement and maintain.
Please share more details on how to implement it.
Thanks a lot!!
Really, really interesting! Can you share more details on how you have set it up?
The customer changed the initial configuration a little bit. I‘ll make another post about it in this quarter which will contain pseudo code and an updated diagram.
I hope you’ve already seen the second part of this blog post:
Pingback: Why Decide? Using Both R and Python in Tableau – at the Same Time! – Konstantin Greger