- problem using snowflake database

Hi Nir,

Sorry to disturb you, but this is my first deploying app.

As you mentioned in the previous email I created a R script code of extracting data and saved it in same folder where my app is saved.

Below is the code


Define UI

ui <- fluidPage(

Application title

titlePanel("Forecasting Model"),

Sidebar with a slider input for number of bins


"Number of weeks:",
min = 1,
max = 50,
value = 30)

Show a plot of the generated distribution


Define server

server <- function(input, output) {
source('~/sample/Forecast/Snowflakes.R', local = TRUE)
output$distPlot <- renderPlot({
forecast<-DBI::dbGetQuery(conn,"SELECT * FROM FORECAST_WEEKLY")
fit_arima<-auto.arima(y,d=1,D=1,stepwise = FALSE,approximation = FALSE,trace = TRUE)

forecast<-DBI::dbGetQuery(conn,"SELECT * FROM FORECAST_WEEKLY")
fit_arima<-auto.arima(y,d=1,D=1,stepwise = FALSE,approximation = FALSE,trace = TRUE)

Run the application

shinyApp(ui = ui, server = server)

The error know it shows is


line 31 Path should be to file within the project directory .


Line 4 Path should be to file within the project directory

Line 31 is: source('~/sample/Forecast/Snowflakes.R', local = TRUE)

Line 4: Driver = "/usr/lib/snowflake/odbc/lib/"

Can you please help me to understand this.



when you getwd() in your console when working on this project where are you ?

and the driver location is wrong, you can access a usr folder thats not yours on anothers computer...
/usr/lib/snowflake/odbc/lib/ <- bad <- good, so put this in your project along with the scripts.

With getwd() I got the working directory and mentioned the same in source() and changed the path /usr/lib/snowflake/odbc/lib/ to

But again for the source('/home/rstudio-user/sample/Forecast/Snowflakes.R', local = TRUE') it gives error as

How can I resolve this.

snowflakes.R is in the wd then (/home/sample/forecast on your local computer)
so your app should find it at its current wd without need of being told a path, the name alone is sufficient.
however I dont see a file in your screenshot so I dont believe you moved it to the same location as app.R and snowflakes.R are.

source('Snowflakes.R', local = TRUE)

Everything worked fine but as seen in the snap shot it says Disconnected from the server.
As you mentioned it might be due to not in the location. But is the driver. How can i save file in same folder. I do not know which is this file.I have just the path of it "/usr/lib/snowflake/odbc/lib/". Can you just explain me on this.

Thanks for all your support,

you can switch to terminal.
use cp command to copy from source path to destination path
I'm guessing you are on a unix system ? (or mac?)

The error in the log is:
Error : nanodbc/nanodbc.cpp:983: 00000: [unixODBC][Driver Manager]Can't open lib '' : file not found .
How can i locate this driver file and place in the working directory

you located it. you know the path...

Thanks for all the help.


As you suggested using cp command I copies file to the working directory but still I getting same issue. It says disconnected from the server. What might be the issue? Is it something related to snowflake or shiny server. As log still says Can't open lib '' : file not found
Attaching the screen shots

Please help me !

what is your code for this now ?

Thanks for replying.
Below is the code.
conn<- DBI::dbConnect(odbc::odbc(),
Driver = "",
server = "",
role = "SYSADMIN",
database = "TAL_SF",
Schema = "TS",
warehouse = "TAL_SF_WH",
UID=" ",
pwd=' ',
timeout = 10)
Should I add or change some thing.Please let me know.

does that work locally, i.e. can you run exactly that code in the console and get a working conn?
(sidenote : also it seems to me you should add library(odbc) if you are using it)

I Have included
conn<- DBI::dbConnect(odbc::odbc(),
Driver = "" packages in snowflake.R and library(odbc) in app.R
But same issue continues says Dissconnected from server.
The code work perfectly fine with Run App(console). That means it might not be the problem with snowflake database. But when I double click the file it says its a large file to open in source editor, attaching the screen shot of it.
Is the issue related to Should I subscribe with monthly payment. Please guide me with this.

my guess is that this snowflake stuff requires the server to have some snowflake utilitys into its OS, which I don't think you as a User could do. You should maybe contact support directly and ask them if they can install it (assuming that is the issue).

This same document was referred while installing the drivers. Yesterday I had sent a support request for this issue where they replies as below:
Snowflake is not currently supported. It is currently next in line for for support, but unfortunately I cannot give you a timescale for that, as it is dependent on a number of factors.
Does this mean they might not support for snowflakes issues?? But I am able to extract the data from snowflakes database and able to run the app in console. Is the issue with not able to open
How can i contact for their support.
Can you suggest on this.

who were you in contact with ? its confusing because you make it sound like, but then you ask me to introduce you ?

If they dont yet support it then they dont yet support it...

You could potentially run your own shiny server to host, and install whatever utilities you want.

Sorry my friend.
I had just posted in Rstudio support. I was just exploring to get the solution. I am new to and I am not getting any idea how to directly contact them.


seems only paid users are encouraged to raise tickets.

I'lll see about adding tags to this thread in case someone from other there browses this and reads it

Thanks a lot for all the support.
I hope I could solve this issue!