Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mssql database support #346

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

nextchamp-saqib
Copy link
Member

@nextchamp-saqib nextchamp-saqib commented Nov 7, 2024

Setting up odbc for MSSQL database connection

  1. Install FreeTDS:

    # on mac
    brew install freetds
    
    # on linux
    sudo apt install unixodbc-dev unixodbc freetds-bin freetds-dev
  2. Find the driver location:

    tsql -C | grep "freetds.conf directory" | awk '{print $NF}' | sed 's/etc/lib\/libtdsodbc.so/'
  3. Copy the driver location (eg. /opt/homebrew/lib/libtdsodbc.so) and put it in the site_config.json under mssql_odbc_driver key. Example:

    {
     "mssql_odbc_driver": "/opt/homebrew/lib/libtdsodbc.so"
    }
  4. Add a MSSQL data source and check if it works

@git-avc
Copy link

git-avc commented Nov 11, 2024

I was working on it too, same way.
Thanks for that @nextchamp-saqib !

@nextchamp-saqib
Copy link
Member Author

Hi @git-avc

I didn't merge this because I wasn't able to test with a MSSQL database. Let me know if you have any MSSQL instance to test with.

@git-avc
Copy link

git-avc commented Nov 11, 2024

Hi @nextchamp-saqib ... Yeah, I've tested with your branch, but found some issues with dependencies at connection. Need to install 'ibis-framework[mssql]' package
Tried this but still not working, I'm trying to fix it.

@faiumer
Copy link

faiumer commented Nov 11, 2024

waiting for the update

@git-avc
Copy link

git-avc commented Nov 11, 2024

@nextchamp-saqib

Got it ... ibis mssql needs ODBC SQL Server driver installed on host. So we have to specify driver as argument on connection string (for example ... "ODBC Driver 17 for SQL Server"). IMHO it should be added to Datasource doctype ...

@git-avc
Copy link

git-avc commented Nov 11, 2024

Done here ...
#351

Used generic driver field. Maybe usable for other connectors.

@nextchamp-saqib nextchamp-saqib force-pushed the develop branch 2 times, most recently from 380252e to 7a458c4 Compare December 11, 2024 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants