Orange Forum • View topic - ContextHandler for SQL statements

ContextHandler for SQL statements

A place to ask questions about methods in Orange and how they are used and other general support.

ContextHandler for SQL statements

Postby ragrawal » Tue Apr 09, 2013 14:19


I am using Orange as a framework for generating SQL queries. I am able to build most of the required modules but not able to save the settings. I have SQL object passing from one node to another. I am completely lost on how to use contextHandler to serialize these SQL objects.

For instance, consider a concrete example. I have a "load" module that allow a user to load a specific table from the database. This creates a statement like "select * from db.tbl". Then there is a "prune" module that allows users to select certain attributes from the db.tbl. Let say user selected three of the five attributes. For getting the list of attributes, I query the database for the selected table and fetch all the attributes. For each selected attribute, user also provide an alternative alias. For instance, select account_id as user_id from db.tbl. In this case the selected attribute is account_id and the alias is user_id. I would like to save the selected attributes and there alias so that next time schema is loaded they are already available. Can someone please help me on how to move forward with this.


Return to Questions & Support