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
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
You might try reaching out to the author of this issue:
to see if they need help / additional contributors.
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
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_binaryand:unicode.characters_to_listcalls (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/WINDOWSfor 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.







