blob: 83888f3072481c08043a45a8023de2c211fa76dc [file] [log] [blame]
/*
* Testcase Name : c2c.aql
* Description : Insert data into target datase by doing a select on source dataset.
* : Here both source and target datasets are internal datasets
* Success : Yes
* Date : 23rd May 2012
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type TestType as closed {
id:int32,
description:string,
name:string
}
// source dataset
create dataset T1(TestType) partitioned by key id;
// target dataset
create dataset T2(TestType) partitioned by key id;
insert into dataset T1({
"id":1234,
"description":"donut",
"name":"Cake"
}
);
insert into dataset T2(for $l in dataset("T1") return $l );
for $d in dataset("T2")
order by $d.id
return $d