lindem

lindem

MSSQL and Ecto3

I want to write an elixir application performing some ETL work on an SQL Server database (I can see how to do it with ecto, and other ways I can see doing it are harder).

I have found mssql_ecto which does not seem to work with ecto 3, and tds_ecto also seems to not be up to date (I am aware of a fork of ecto_sql but could not glean much from it). Are there any other things I can try to make it work that I have not seen yet?

Most Liked

kevn

kevn

The tds_ecto library is close to being ready for Ecto 3.0. A summary of the progress can be found here

dimitarvp

dimitarvp

There are efforts which seem to be almost completed to bring MySQL up to speed. But not sure the core team would tackle MSSQL afterwards (or ever).

I personally think it could help Elixir’s adoption a lot.

al2o3cr

al2o3cr

You might try reaching out to the author of this issue:

to see if they need help / additional contributors.

lindem

lindem

Thanks for your reply.

I already thought that was going to be the case, but it never hurts to ask whether I missed something.

lindem

lindem

The project is done now.

In case anybody finds this thread – I have tried some things, but the SQL Server database (running on Windows) itself was problematic to work with.

I tried/used

  • mssqlex with and without mssql_ecto
  • tds with and without tds_ecto
  • Ecto in version 2
  • the :unicode.characters_to_binary and :unicode.characters_to_list calls (strings are character lists in erlang)
  • https://github.com/tallakt/codepagex in an attempt to convert the data to utf-8 (I enabled the CP1252 encoding in VENDORS/MICSFT/WINDOWS for this)

I was able to query the database with all adapters and drivers. The encoding issue surprisingly took most of the time. Most of the time I got recognizable text intermixed with garbage. The data could be queried correctly with raw SQL in SSMS (the SQL server GUI). There is another account of this difficulty with no solution here.

I suspect that at least one layer in the chain lied about its encoding.

I was not granted much time to try this. The database was not reachable off-premise, either.

Be that as it may, we ended up not using elixir.

Again, Thanks for everybody’s help.

Where Next?

Popular in Questions Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New

Other popular topics Top

srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New

We're in Beta

About us Mission Statement