I am trying to connect one of my remote database using odbc driver which is configured using DSN. But I did not find related parameters to create_engine object.
Can anyone help on this?
For SQL Server:
You need to first create a DSN object to use. Go to Start»Settings»Control Panel»Administrative Tools»Data Sources
Open System DSN and add a new DSN. It will give you a list of databases for which you can create a DSN. Select one and and proceed with the steps. Give a name to the DSN (by which you will refer to it later) and the database server name to which you want to connect to. Click here for more detailed steps.
SQL Alchemy
For using this DSN you created with your program you need to use the following steps:
engine = sa.create_engine('mssql+pyodbc://SQLTEST')
saconn = engine.connect()
Now you have the engine object saconn. This can be used for performing your queries on the database.
Hope it helped.