tag | b69a9c62d533c51f556e2c9419453e18d3818801 | |
---|---|---|
tagger | Julian Hyde <julianhyde@gmail.com> | Tue Feb 18 10:47:50 2014 -0800 |
object | 0d92431a2e4ad3cded8fde89131491f14be1d91e |
[maven-release-plugin] copy for tag optiq-csv-0.2
commit | 0d92431a2e4ad3cded8fde89131491f14be1d91e | [log] [tgz] |
---|---|---|
author | Julian Hyde <julianhyde@gmail.com> | Tue Feb 18 10:47:49 2014 -0800 |
committer | Julian Hyde <julianhyde@gmail.com> | Tue Feb 18 10:47:49 2014 -0800 |
tree | 6b57e1b12919c91bab477f3c1c2bbefb62a31ece | |
parent | e78e5baaec706d867551dac61c02eb893931b7cb [diff] |
[maven-release-plugin] prepare release optiq-csv-0.2
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.6 or higher; 1.7 preferred), git and maven (3.0.4 or later).
$ git clone git://github.com/julianhyde/optiq-csv.git $ cd optiq-csv $ mvn compile
Let‘s take a quick look at optiq-csv’s (and optiq‘s) features. We’ll use sqlline, a SQL shell that connects to any JDBC data source and is included with optiq-csv.
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
(On Windows, the command is sqlline.bat
.)
As you can see, Optiq has a full SQL implementation that can efficiently query any data source.
For a more leisurely walk through what Optiq can do and how it does it, try the Tutorial.