blob: 03e6e339dc95cd00695d54192bf73a42a78d3333 [file] [log] [blame]
khfaraaz82@gmail.coma2716132012-04-30 06:20:50 +00001/*
2 * Testcase name : open-closed-14.aql
3 * Description : insert into target dataset - select * from source dataset
4 * : in this case dataset1 and dataset2 are fo different schema.
5 * Success : This test should succeed.
6 * Date : March 27 2012
7 */
8
9drop dataverse testdv2 if exists;
10create dataverse testdv2;
11use dataverse testdv2;
12
13create type testtype01 as closed {
14 id: string,
15 name: string?
16}
17
18create type testtype02 as closed {
19 id: string
20}
21
22create dataset testds01(testtype01) partitioned by key id;
23
24create dataset testds02(testtype02) partitioned by key id;
25
26insert into dataset testds01 (
27{ "id": "001" }
28);
29
30insert into dataset testds01 (
31{ "id": "002", "name": "John Doe" }
32);
33
34insert into dataset testds02 (
35{ "id": "003" }
36);
37
38insert into dataset testds02 (
39{ "id": "004" }
40);
41
42insert into dataset testds02 (
43{ "id": "005" }
44);
45
46insert into dataset testds01(
47for $d in dataset("testds02")
48return $d
49);
50
51for $d in dataset("testds01")
52return $d
53