1.该测试库来自于以下的网站:
http://stat-computing.org/dataexpo/2009/the-data.html
该网站上所有的年份的数据库加起来是123534969行。
2.将以上的数据库下载下来,我放到了这个文件夹中:/mapd-core/build/sample_datasets/flights_year。
3.用以下命令分别解压:bunzip2 1999.csv.bz2
4.新建一个表:
create table flights_ASA_year (
fYear int,
fMonth int,
DayofMonth int,
DayOfWeek int,
DepTime int,
CRSDepTime int,
ArrTime int,
CRSArrTime int,
UniqueCarrier varchar(5),
FlightNum int,
TailNum varchar(8),
ActualElapsedTime int,
CRSElapsedTime int,
AirTime int,
ArrDelay int,
DepDelay int,
Origin varchar(3),
Dest varchar(3),
Distance int,
TaxiIn int,
TaxiOut int,
Cancelled int,
CancellationCode varchar(1),
Diverted varchar(1),
CarrierDelay int,
WeatherDelay int,
NASDelay int,
SecurityDelay int,
LateAircraftDelay int
);
5.使用以下的命令拷备10次:
COPY flights_ASA_year from ‘/mapd-core/build/sample_datasets/flights_year/*‘ WITH (nulls = ‘NA‘);
每次结果有以下的返回,证明拷备成功:
Result
Loaded: 123534969 recs, Rejected: 0 recs in 441.858000 secs
6.至此创建了MapD官网上的12行测试数据库。