Home Forums SQL Server 2017 SQL Server 2017 - Development Is learning Python/R an advantage for SQL Server Developers? Need an expert advice. RE: Is learning Python/R an advantage for SQL Server Developers? Need an expert advice.

  • Jeff Moden - Thursday, January 25, 2018 7:48 AM

    jonathan.crawford - Thursday, January 25, 2018 6:56 AM

    Because I don't have to know T-SQL inside out and upside down in order to use R for something that SQL won't even do.

    There's no question that R brings some fantastic stuff to the table and that there's a lot of stuff that it can do that T-SQL can't do never mind being super easy to do in R and I'm not challenging that.  What I am challenging is the use of R, Powershell, SQL CLR, VBS, etc, etc, etc to do things that are actually quite easy to do in T-SQL that people just don't seem to take the time to learn because they think that SQL Server is just a place to store data.

    My favorite example is when 2005 came out and the use of SQL CLR was all the rage.  To make a much longer story shorter, a "developer" brought me an SQL CLR to deploy to production and I refused.  He stormed out of the room before I could complete the word "No" and explain and he took it to management and I was called out on the carpet because it was supposedly a showstopper holding up a project.  What did the SQL CLR do that was so critical.  It calculated a MODULO.  You know... the one that uses the "%" operator in T-SQL. <headdesk><major facepalm>

    That's what I'm talking about.

    I'll also add "silo-ing" to that.  In the various companies that I've worked for in the past, it seemed to be rampant and seems to continue even in today's world of DevOps.  What I'm talking about is people who just don't know something in T-SQL even though it may be super simple to accomplish.  Rather than asking for a bit of help, they limit themselves to the tools that they do know and that's wrong at so many levels.  They may even teach themselves how to do something in R or whatever.  While such learning isn't a bad thing, they didn't take the time to learn the right thing nor even ask if there was an easy way to do what they need in T-SQL.

    I also get the tired ol' lecture of "Just because you can do something in SQL Server, doesn't mean you should".  While I do agree with that, a lot of people use that as an uniformed, ring-knocker, ad hominem attack to make up for their lack of even simple knowledge of SQL Server.  They typical follow that with the totally over used and totally desperate attempt to save face by saying that "SQL Server isn't the center of the universe".  My normal response is, "Fine.  Let's turn it off and see if you're right". 😉

    I definitely subscribe to the idea of using the right tool for the right thing but the right tool isn't always something outside of SQL Server.  That's why I have the play on words in my signature of "Just because you can do something in SQL Server, does mean you SHOULDN'T". 😉  At the very least, ask someone who might know if T-SQL is the right tool or if the tool you're familiar with is a better tool, especially if you don't know squat about T-SQL.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)