-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ENH] ODBC support for SQL Table #3565
Comments
Could you rename this issue? SQLite support is not about ODBC. |
You are right, it is not directly related, but there seem to be SQLite drivers available for ODBC. I am afraid that SQLite on its own has no chance of making it into Orange, unless someone wants to contribute a pull request with the appropriate support. |
BTW, https://github.com/baztian/jaydebeapi may be useful too. |
Using SQLAlchemy might be a solution to this problem. It allows to interface with various SQL dialects - including PyODBC and pymssql, the latter is currently used in the widget. I see the Core as the most valuable part of SQLAlchemy for this issue. I believe valuable insight can be gained from studying the db-to-sqlite tool by Simon Willison in which he makes use of the Database URLs. Applying this to Orange3 would only require a smart way to create the Database URL from the input in the SQL Table widget, which should be straight forward since the Database URLs have a well-defined format and the use of SQLAlchemy as in the db-to-sqlite tool. |
Issue moved to #4090. |
Hi, I had implemented a prototype of connecting to the Database via pyodbc. You can view it in action in this video (first 40 seconds) The idea was to use 2 widgets:
Table widget is the tricky part, as:
In respect to implementing this feature in Orange.
The SQL Table widget is not UI/UX friendly currently as the user has to go through a lot of steps to make it work. But, I think it is a good starting point and we can make the following changes to it:
@ajdapretnar @janezd Please let me know your thoughts in regards to the idea I have suggested above. If you can suggest any improvements it would be great. Since it is a core widget and not an extension, i can start some work on it and send a pull request once we decide the final design of the widget. |
@animator, Feel free to join our new Discord server and engage with us in the #development channel, should you prefer to communicate over chat. |
Is there an update on this? |
@pjaol I had raised the issue (way back 30 Oct 2019) in the discord server. |
It looks like someone started on #5079 |
Yep, it is waiting since I have currently some other projects which need to be done first. This PR has pretty much a working solution (which has some minor issues discovered while writing tests). I need to fix them and test a bit more with databases. Besides MSSQL and Postgress (which are already supported), widget now supports SQLite and MySQL. I also hope to add Oracle support soon. If anyone is interested in using and testing the implementation be welcome to check out the pull request. |
To address all database issues at once, we would have to implement ODBC support. This would enable loading any database and reroute the specifics of handling each DB instance to an external framework.
The text was updated successfully, but these errors were encountered: