blob: 17da0b00a77dbe61d7405288cec3789aaa5d0f2d [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001/* scan and print an ADM file as a dataset of closed records */
2
3drop dataverse test if exists;
4create dataverse test;
5use dataverse test;
6
7create type DBLPType as closed {
8 id: int32,
9 dblpid: string,
10 title: string,
11 authors: string,
12 misc: string
13}
14
vinayakb38b7ca42012-03-05 05:44:15 +000015create dataset DBLPadm(DBLPType)
ramangrover29669d8f62013-02-11 06:03:32 +000016 primary key id;
vinayakb38b7ca42012-03-05 05:44:15 +000017
18// drop dataset DBLPadm;
19load dataset DBLPadm
20using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
21(("path"="nc1://data/dblp-small/dblp-small.adm"),("format"="adm"));
22
23write output to nc1:"rttest/scan_20.adm";
24
25for $paper in dataset('DBLPadm')
26order by $paper.id
27return $paper