shinyapps.io - problem using snowflake database

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

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

How can I resolve this.
Thanks,
Swapna

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 libSnowflake.so 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 libSnowflake.so not in the location. But libSnowflake.so is the driver. How can i save libSnowflake.so file in same folder. I do not know which is this file.I have just the path of it "/usr/lib/snowflake/odbc/lib/libSnowflake.so". Can you just explain me on this.

Thanks for all your support,
Swapna

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 'libSnowflake.so' : 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.

Swapna

Hi,
As you suggested using cp command I copies libSnowflake.so 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 'libSnowflake.so' : file not found
Attaching the screen shots

!
Please help me !

what is your code for this now ?

Thanks for replying.
Below is the code.
library(DBI)
conn<- DBI::dbConnect(odbc::odbc(),
snowflake="SnowflakeDSIIDriver",
Driver = "libSnowflake.so",
server = ".eu-west-1.snowflakecomputing.com.",
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.
Thanks

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
library(DBI)
library(dplyr)
library(dbplyr)
library(odbc)
conn<- DBI::dbConnect(odbc::odbc(),
snowflake="SnowflakeDSIIDriver",
Driver = "libSnowflake.so" 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 libSnowflake.so file it says its a large file to open in source editor, attaching the screen shot of it.
Is the issue related to shinyapp.io. Should I subscribe shinyapp.io with monthly payment. Please guide me with this.
Thanks

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 shinyapps.io support directly and ask them if they can install it (assuming that is the issue).
https://docs.snowflake.com/en/user-guide/odbc-linux.html

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 libSnowflake.so not able to open
How can i contact shinyapp.io for their support.
Can you suggest on this.

who were you in contact with ? its confusing because you make it sound like shinyapps.io, 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 shinyapp.io. and I am not getting any idea how to directly contact them.

Thanks,
Swapna

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!

Hi,
Just want to ask you one more doubt.
When I uploaded a csv file from my computer to the linux server and ran the app with both the CSV file and the app in same working directory the app is running fine on the shinyapp.io.
That means, is the problem with shinyapp not able to get the snowflake connection/libsnowflake driver?
In such case what should be done.

Thanks,
Swapna

yes, shinyapps.io doesnt support snowflake at this time