blob: 675f26da4b432482b46b9a9d544972829e32f57e [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)
khfaraaz82@gmail.com88f5c5d2012-05-02 20:04:10 +000016 partitioned by 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