commit | 82eb2a7f2df0cd9a19bc1c4ca79ed3ce51736fef | [log] [tgz] |
---|---|---|
author | Julian Hyde <julian@hydromatic.net> | Fri May 24 15:38:02 2013 -0700 |
committer | Julian Hyde <julian@hydromatic.net> | Fri May 24 15:38:02 2013 -0700 |
tree | c813d47460e5b359fe4ef35e8d121769c791ed9e | |
parent | b3d0a82ca0a2cdbf88dd47b9eb239cfb2ce98618 [diff] |
Update README.md
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.