Skip to main content

Crate foodmart_data

Crate foodmart_data 

Source
Expand description

The Foodmart data set, as embedded CSV files.

The data set originated as part of the test suite of the Pentaho Mondrian OLAP engine. It contains 26 tables: 7 fact tables, such as sales_fact_1997, and 19 dimension tables, such as customer.

TABLES describes the schema; each Table carries its own CSV text, so there are no files to find at run time.

let table = foodmart_data::find("days").unwrap();
assert_eq!(table.column_names(), ["day", "week_day"]);
assert_eq!(table.rows().count(), 7);

The crate has no dependencies and does not link a database. To load the data, generate DDL and DML with Table::create_table_sql and Table::insert_sql and execute them against a database of your choice.

Structs§

Column
A column of a Table.
Rows
An iterator over the data rows of a Table, created by Table::rows.
Table
A table in the Foodmart data set.

Statics§

TABLES
Every table in the data set, in alphabetical order.

Functions§

find
Returns the table with the given name.
table_names
Returns the names of all tables, in alphabetical order.