commit | 1b43835a047f308aa48bf0d73b7d52b5da268101 | [log] [tgz] |
---|---|---|
author | Julian Hyde <julianhyde@gmail.com> | Sun May 26 13:39:18 2013 -0700 |
committer | Julian Hyde <julianhyde@gmail.com> | Sun May 26 13:39:18 2013 -0700 |
tree | 40d84697500b4759ac51392f70ed3c46ef19edbe | |
parent | 7f4701846ce0421bec69a5c7b78d8ad66ee285af [diff] |
Factor tutorial out of readme, and add sections on JDBC schema and clone schema adapters.
Optiq adapter that reads CSV files.
Optiq-csv is a nice simple example of how to connect Optiq to your own data source and quickly get a full SQL/JDBC interface.
You need Java (1.5 or higher; 1.7 preferred) and maven (2 or higher).
$ git clone git://github.com/julianhyde/optiq-csv.git $ cd optiq-csv $ mvn compile
Sqlline is a shell that connects to any JDBC data source and lets you execute SQL queries. Connect to Optiq and try out some queries.
$ ./sqlline sqlline> !connect jdbc:optiq:model=target/test-classes/model.json admin admin sqlline> !tables sqlline> !describe emps sqlline> SELECT * FROM emps; sqlline> EXPLAIN PLAN FOR SELECT * FROM emps; sqlline> !connect jdbc:optiq:model=target/test-classes/smart.json admin admin sqlline> EXPLAIN PLAN FOR SELECT * FROM emps; sqlline> SELECT depts.name, count(*) . . . .> FROM emps JOIN depts USING (deptno) . . . .> GROUP BY depts.name; sqlline> VALUES char_length('hello, ' || 'world!'); sqlline> !quit
You can also register a CsvSchema as a schema within an Optiq instance. Then you can combine with other data sources.
You can write a “vanity JDBC driver” with a different name.
You can add optimizer rules and new implementations of relational operators to execute queries more efficiently.