blob: 33e8e5255fd85bcc4ef3111ffb894d80186616c0 [file] [log] [blame]
RamanGrover29@gmail.com58cf3302012-11-09 00:27:45 +00001/*
2 * Description : Create UDF to read from internal dataset
3 * Expected Res : Success
4 * Date : Sep 4th 2012
5 */
6
7drop dataverse test if exists;
8create dataverse test;
9
10write output to nc1:"rttest/cross-dataverse_udf09.adm";
11
12create type test.TestType as open {
13id : int32
14}
15
16create dataset test.t1(TestType) partitioned by key id;
17
18insert into dataset test.t1({"id":345});
19insert into dataset test.t1({"id":315});
20insert into dataset test.t1({"id":245});
21insert into dataset test.t1({"id":385});
22insert into dataset test.t1({"id":241});
23insert into dataset test.t1({"id":745});
24insert into dataset test.t1({"id":349});
25insert into dataset test.t1({"id":845});
26
27create function test.readDataset($a) {
28$a
29}
30
31test.readDataset(for $a in dataset('test.t1') order by $a.id return $a);