blob: a07aab2367a85799971a41e41a508ae6f94ac1f9 [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
15create nodegroup group1 if not exists on nc1;
16
17create dataset DBLPadm(DBLPType)
18 partitioned by key id on group1;
19
20// drop dataset DBLPadm;
21load dataset DBLPadm
22using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
23(("path"="nc1://data/dblp-small/dblp-small.adm"),("format"="adm"));
24
25write output to nc1:"rttest/scan_20.adm";
26
27for $paper in dataset('DBLPadm')
28order by $paper.id
29return $paper