blob: 83888f3072481c08043a45a8023de2c211fa76dc [file] [log] [blame]
khfaraaz82@gmail.com6621b1d2012-05-25 07:26:35 +00001/*
2 * Testcase Name : c2c.aql
3 * Description : Insert data into target datase by doing a select on source dataset.
4 * : Here both source and target datasets are internal datasets
5 * Success : Yes
6 * Date : 23rd May 2012
7 */
8
9drop dataverse test if exists;
10create dataverse test;
11use dataverse test;
12
13create type TestType as closed {
14id:int32,
15description:string,
16name:string
17}
18
19// source dataset
20create dataset T1(TestType) partitioned by key id;
21
22// target dataset
23create dataset T2(TestType) partitioned by key id;
24
25insert into dataset T1({
26"id":1234,
27"description":"donut",
28"name":"Cake"
29}
30);
31
32insert into dataset T2(for $l in dataset("T1") return $l );
33
34for $d in dataset("T2")
35order by $d.id
36return $d