You can translate the question and the replies:

compatibility with pymssql

We are using package pymssql (2.2.4). Is our code comaptible with Denodo as-is, or will we have to mkae changes to use a different package?
user
28-03-2023 10:48:42 -0400
code

5 Answers

Hi, From my understanding, it seems you’re currently using Python library **pymssql** in your data science notebook to connect to SQL Server database, and you would like to connect to Denodo as well, probably to use the same SQL queries to connect to Denodo instead of the SQL Server database directly. In my opinion, the **pymssql** library is more efficient on connecting to Microsoft SQL Server compared to Denodo recommended libraries like **SQLAlchemy** and **psycopg2**. There are a few Python libraries you can use to connect to Denodo from Python. You can refer to this [Knowledge Base](https://community.denodo.com/kb/en/view/document/How%20to%20connect%20to%20Denodo%20from%20Python%20-%20a%20starter%20for%20Data%20Scientists) for more details including example codes on how to establish connection and create queries. Hope this helps!
Denodo Team
29-03-2023 23:00:31 -0400
code
Hi, thank you for the answer. Can you explain what you mean by 'more efficient' please? The code is already written using pymssql so I would like o know if it is really necessary to change it to work with Denodo. Many thanks
user
30-03-2023 06:01:23 -0400
Hi, It is recommended to use **pymssql** with SQL Server databases because it uses **FreeTDS**, which implements the interoperability of the functions defined by its supported vendors Sybase and Microsoft. It is more efficient in terms of porting, interfacing and performance on querying the SQL database of these vendors. On the other hand, **Denodo Dialect in SQLAlchemy** and **psycopg2** are using **libpq**, which provides an interface specifically for PostgreSQL and the extension of its functions. It’s more efficient in terms of handling secure and heavy multi-threaded connections, which is how Denodo behaves. Hope it clarifies your question!
Denodo Team
04-04-2023 00:08:14 -0400
code
Hello! Thank you for all your explanations so far. It seems that I can use pymssql but it is not as efficient. So I am trying to understand whether or not I really need to change. The app only has light usage, but it does need to be secure. Can I stick with pymssql andd what will I notice in terms of efficiency loss?
user
04-04-2023 05:37:46 -0400
Hi, The Python libraries, listed in our [Knowledge Base](https://community.denodo.com/kb/en/view/document/How%20to%20connect%20to%20Denodo%20from%20Python%20-%20a%20starter%20for%20Data%20Scientists), are the ones that are fully tested with Denodo. If you have a valid support user, I suggest opening a support ticket for further investigation if required. Hope this helps!
Denodo Team
13-04-2023 02:22:08 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here