killerkiara
Hello everyone!
This is my first post, I hope I will be able to make it useful to others as well.
I am trying to setup a connection to the cloud analytical DB Snowflake (https://www.snowflake.com/en/) from a Phoenix app using Snowflex (https://github.com/pepsico-ecommerce/snowflex).
I followed the readme on the Snowflex page, but when I run my server locally I keep getting the following error:
[warning] Unable to connect to snowflake: '[Snowflake][ODBC] (10380) Unable to establish connection with data source. Missing settings: {[SERVER]} SQLSTATE IS: 08001 Connection to database failed.'
I am using:
MacOS 12.6 (Apple Silicon M1)
Erlang version 25.1.1, installed with asdf to have ODBC
Elixir version 1.14.2, installed with asdf
Unixodbc 2.3.12 (installed through Homebrew following the Snowflex readme).
This is how my config file looks like for development, with placeholder secrets. I just need to test pushing some data from local for the time being.
config :snowflex, driver: "/opt/snowflake/snowflakeodbc/lib/libSnowflake.dylib"
config :my_app, SnowflakeConnection,
connection: [
server: "snowflake-server-address",
role: "DEV",
warehouse: "name-of-warehouse",
uid: "user",
pwd: "pwd"
]
I have looked extensively, but did not find any similar error for a Phoenix app and I don’t know what to do to fix it.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dimitarvp
It would be easier for readers if you copy-pasted the errors into a code-formatted ``` block and not post screenshot with a tiny font.
That being said, also please post your configuration so potential helpers can try and offer you modifications.
killerkiara
Thanks a lot @dimitarvp . I have edited my post with the proper formatting for the error message.
What else is needed in terms of providing a configuration, other than the info I posted? Do you mean my mix file? Thanks a lot for trying to help!
dimitarvp
I meant what is in your
config/*.exsfiles that relate to connecting to Snowflake.killerkiara
@dimitarvp , I added what I have in my
config/dev.exs. Only trying to connect from local for now.dimitarvp
Admittedly I never worked with Snowflake but have you tried connecting to it outside Elixir, with some dedicated tool? Similar to how people test connecting to their Postgres DB with the
psqlCLI tool.killerkiara
yes, I just tested the actual connection with a Snowflake tool called
snowsqlthat works just likepsqland I can connect without any issue, using the same connection data I am using in my config file. I very much think the issue is in the ODBC setup on my local machine, but I am not being able to debug it as there are so many different pieces that need to work together.Thanks a lot anyways for your time and your suggestions on how to improve my question.
cevado
what is the name of your app? is it really
:my_app? if not, then the config is pruned.killerkiara
Hi @cevado. No, I just substituted the real name of the app. Is it important what it is called?
dimitarvp
Highly likely I am afraid. I gave up using ODBC long time ago (more than a decade) but I understand – work is work.
Hope you fix it.
killerkiara
I will share a solution in case I am able to make it work, might help others. I have not found much info anywhere so I collected my courage to write a post here