'The Look' data set in hsqldb format
This project contains the 'The Look' data set as an embedded HSQLDB database.
It originated as an internal test data set for the Looker business intelligence (BI) tool, modeling a fictitious fashion business.
The Look's schema consists of 5 tables:
Table | Row count |
---|---|
all_types | 1 |
nested_and_repeated | 2 |
orders | 4,066 |
order_items | 12,142 |
users | 85 |
Its size is about 970 KB uncompressed, 160 KB compressed.
The data set is packaged as a jar file that is published to Maven Central as a Maven artifact. To use the data in your Java application, add the artifact to your project's dependencies:
<dependency>
<groupId>net.hydromatic</groupId>
<artifactId>look-data-hsqldb</artifactId>
<version>0.1</version>
</dependency>
Now you can connect using Java code:
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
final String url = "jdbc:hsqldb:res:look";
final String sql = "select \"id\", \"name\" from \"users\"";
try (Connection c = DriverManager.getConnection(url, "looker", "looker");
Statement s = c.createStatement();
ResultSet r = s.executeQuery(sql)) {
while (r.next()) {
System.out.println(r.getInt(1) + ":" + r.getString(2));
}
}
For your convenience, the net.hydromatic.look.data.hsqldb.LookHsqldb class has public constants:
You can also connect using a JDBC interface such as sqlline.
Make sure that look-data-hsqldb.jar
is on the class path, and start sqlline
:
$ ./sqlline
sqlline version 1.12.0
sqlline> !connect jdbc:hsqldb:res:look sa ""
0: jdbc:hsqldb:res:look> select count(*) from "look"."orders";
+------+
| C1 |
+------+
| 4066 |
+------+
1 row selected (0.004 seconds)
0: jdbc:hsqldb:res:look> !quit
If you use username and password "looker" and "looker", the default schema is "look", so you can omit the table prefix, if you wish:
$ ./sqlline
sqlline version 1.12.0
sqlline> !connect jdbc:hsqldb:res:look looker looker
0: jdbc:hsqldb:res:look> select count(*) from "users";
+------+
| C1 |
+------+
| 4066 |
+------+
1 row selected (0.004 seconds)
0: jdbc:hsqldb:res:look> !quit
Get look-data-hsqldb from Maven Central:
<dependency>
<groupId>net.hydromatic</groupId>
<artifactId>look-data-hsqldb</artifactId>
<version>0.1</version>
</dependency>
Java version 8 or higher.
$ git clone git://github.com/hydromatic/look-data-hsqldb.git
$ cd look-data-hsqldb
$ ./mvnw install
On Windows, the last line is
> mvnw install
Similar data sets:
- chinook-data-hsqldb
- flight-data-hsqldb
- foodmart-data-hsqldb
- scott-data-hsqldb
- steelwheels-data-hsqldb
- License: Apache License, Version 2.0
- Author: Julian Hyde
- Blog: http://blog.hydromatic.net
- Project page: http://www.hydromatic.net/look-data-hsqldb
- Source code: https://github.com/hydromatic/look-data-hsqldb
- Distribution: Maven Central
- Developers list: dev at calcite.apache.org (archive, subscribe)
- Issues: https://github.com/hydromatic/look-data-hsqldb/issues
- Release notes and history