killerkiara

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.

Showing Posts 1 to 10

dimitarvp

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

killerkiara OP

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

dimitarvp

I meant what is in your config/*.exs files that relate to connecting to Snowflake.

killerkiara

killerkiara OP

@dimitarvp , I added what I have in my config/dev.exs. Only trying to connect from local for now.

dimitarvp

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 psql CLI tool.

killerkiara

killerkiara OP

yes, I just tested the actual connection with a Snowflake tool called snowsql that works just like psql and 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

cevado

what is the name of your app? is it really :my_app? if not, then the config is pruned.

killerkiara

killerkiara OP

Hi @cevado. No, I just substituted the real name of the app. Is it important what it is called?

dimitarvp

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

killerkiara OP

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 :slight_smile:

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews