blob: 2d71d87bc7d68b354d30adf74856540ecdfd331a [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001/* scan and print a delimited text file */
2drop dataverse test if exists;
3create dataverse test;
4use dataverse test;
5
6create type DBLPType as open {
7 id: int32,
8 dblpid: string,
9 title: string,
10 authors: string,
11 misc: string
12}
13
vinayakb38b7ca42012-03-05 05:44:15 +000014create dataset DBLP1(DBLPType)
khfaraaz82@gmail.com88f5c5d2012-05-02 20:04:10 +000015 partitioned by key id;
vinayakb38b7ca42012-03-05 05:44:15 +000016
17// drop dataset DBLP1;
18load dataset DBLP1
19using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
20(("path"="nc1://data/dblp-small/dblp-small-id.txt"),("format"="delimited-text"),("delimiter"=":"));
21
vinayakb38b7ca42012-03-05 05:44:15 +000022write output to nc1:"rttest/scan_10.adm";
23
24for $paper in dataset('DBLP1')
25order by $paper.id
26return $paper