6 Replies Latest reply on Jun 26, 2018 7:08 AM by Dipesh Surana

    Stored Procedures in tableau using R

    Dipesh Surana



      Since Netezza Stored procedures are not directly supported by tableau, I am experimenting a process of running Stored procedures in tableau using R.

      Basically I call the nzsql command in R to execute the SP. The SP stores values into a temp table which I want as my output.


      My tableau calculated field is :


      Connect to database

      nzQuery(paste("Exec SProc(",.arg1,")"))

      Data<-nzQuery("Select Variable from Mytemptable")





      The Input(.arg1) is my variable that I need to pass it to the stored procedure via a tableau parameter.

      When I input parameter as 5 in tableau it gives an error

      It says '[RODBC] ERROR: Could not SQLExecDirect "Exec SProc( 5 )" '


      Just trying my luck out here if anybody has tried this or has come as such errors when connecting to R and database.


      Thanks in advance!