http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimensions/testdim3.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/testdim3.xml b/lens-cube/src/test/resources/schema/dimensions/testdim3.xml new file mode 100644 index 0000000..6f7d295 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/testdim3.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension name="testdim3" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="int" name="id" description="code"> + </dim_attribute> + <dim_attribute _type="string" name="name" description="name"> + </dim_attribute> + <dim_attribute _type="string" name="testdim4id" description="f-key to testdim4"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains> + <join_chain dest_table="testdim4" name="dim4chain" display_string="dim4-chain" description="dim4 thru dim3"> + <paths> + <path> + <edges> + <edge> + <from table="testdim3" column="testdim4id" maps_to_many="false"/> + <to table="testdim4" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + </join_chains> + <properties> + <property name="base.testdim3.expressions.list.size" value="0"/> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.testdim3.attributes.list0" value="id,name,testdim4id"/> + <property name="dimension.testdim3.timed.dimension" value="dt"/> + <property name="cube.dimension.testdim4id.type" value="string"/> + <property name="dimension.testdim3.attributes.list.size" value="1"/> + <property name="dimension.joinchain.dim4chain.fullchain.0" value="testdim3.testdim4id.false,testdim4.id.false"/> + <property name="cube.table.testdim3.weight" value="0.0"/> + <property name="dimension.joinchain.dim4chain.description" value="dim4 thru dim3"/> + <property name="cube.col.id.description" value="code"/> + <property name="dimension.testdim3.joinchains.list.size" value="1"/> + <property name="dimension.testdim3.joinchains.list0" value="dim4chain"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.testdim4id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.joinchain.dim4chain.numchains" value="1"/> + <property name="cube.col.name.description" value="name"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.name.type" value="string"/> + <property name="cube.col.testdim4id.description" value="f-key to testdim4"/> + <property name="dimension.joinchain.dim4chain.displaystring" value="dim4-chain"/> + </properties> +</x_dimension>
http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimensions/testdim4.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/testdim4.xml b/lens-cube/src/test/resources/schema/dimensions/testdim4.xml new file mode 100644 index 0000000..ca615bb --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/testdim4.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension name="testdim4" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="int" name="id" description="code"> + </dim_attribute> + <dim_attribute _type="string" name="name" description="name"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.testdim4.attributes.list.size" value="1"/> + <property name="dimension.testdim4.timed.dimension" value="dt"/> + <property name="base.testdim4.expressions.list.size" value="0"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.table.testdim4.weight" value="0.0"/> + <property name="dimension.testdim4.attributes.list0" value="id,name"/> + <property name="dimension.testdim4.joinchains.list.size" value="0"/> + <property name="cube.col.name.description" value="name"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.name.type" value="string"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimensions/unreachabledim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/unreachabledim.xml b/lens-cube/src/test/resources/schema/dimensions/unreachabledim.xml new file mode 100644 index 0000000..290448d --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/unreachabledim.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension name="unreachabledim" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="int" name="id" description="code"> + </dim_attribute> + <dim_attribute _type="int" name="name" description="code"> + </dim_attribute> + </attributes> + <join_chains/> + <properties> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.unreachabledim.attributes.list.size" value="1"/> + <property name="dimension.unreachabledim.attributes.list0" value="id,name"/> + <property name="base.unreachabledim.expressions.list.size" value="0"/> + <property name="dimension.unreachabledim.joinchains.list.size" value="0"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.unreachabledim.timed.dimension" value="dt"/> + <property name="cube.col.name.description" value="code"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.name.type" value="int"/> + <property name="cube.table.unreachabledim.weight" value="0.0"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimensions/user_interests.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/user_interests.xml b/lens-cube/src/test/resources/schema/dimensions/user_interests.xml new file mode 100644 index 0000000..4a677a3 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/user_interests.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension name="user_interests" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="int" name="user_id" description="user id"> + </dim_attribute> + <dim_attribute _type="int" name="id" description="id"> + </dim_attribute> + <dim_attribute _type="int" name="sport_id" description="sport id"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="cube.dimension.id.type" value="int"/> + <property name="cube.dimension.user_id.type" value="int"/> + <property name="cube.table.user_interests.weight" value="0.0"/> + <property name="cube.dimension.user_id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.user_interests.attributes.list.size" value="1"/> + <property name="cube.dimension.sport_id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.sport_id.description" value="sport id"/> + <property name="cube.col.id.description" value="id"/> + <property name="dimension.user_interests.attributes.list0" value="user_id,id,sport_id"/> + <property name="dimension.user_interests.joinchains.list.size" value="0"/> + <property name="cube.col.user_id.description" value="user id"/> + <property name="base.user_interests.expressions.list.size" value="0"/> + <property name="dimension.user_interests.timed.dimension" value="dt"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.sport_id.type" value="int"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimensions/userdim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/userdim.xml b/lens-cube/src/test/resources/schema/dimensions/userdim.xml new file mode 100644 index 0000000..af5c720 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/userdim.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension name="userdim" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="string" name="name" description="name"> + </dim_attribute> + <dim_attribute _type="string" name="age" description="age"> + </dim_attribute> + <dim_attribute _type="string" name="gender" description="gender"> + </dim_attribute> + <dim_attribute _type="int" name="id" description="id"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains> + <join_chain dest_table="sports" name="usersports" display_string="user-sports" description="user sports"> + <paths> + <path> + <edges> + <edge> + <from table="userdim" column="id" maps_to_many="false"/> + <to table="user_interests" column="user_id" maps_to_many="true"/> + </edge> + <edge> + <from table="user_interests" column="sport_id" maps_to_many="false"/> + <to table="sports" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + </join_chains> + <properties> + <property name="cube.dimension.age.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.joinchain.usersports.numchains" value="1"/> + <property name="dimension.userdim.joinchains.list.size" value="1"/> + <property name="cube.col.id.description" value="id"/> + <property name="cube.dimension.age.type" value="string"/> + <property name="dimension.userdim.attributes.list.size" value="1"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.name.description" value="name"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.name.type" value="string"/> + <property name="cube.table.userdim.weight" value="0.0"/> + <property name="dimension.userdim.joinchains.list0" value="usersports"/> + <property name="dimension.userdim.attributes.list0" value="name,age,gender,id"/> + <property name="cube.dimension.gender.type" value="string"/> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.joinchain.usersports.displaystring" value="user-sports"/> + <property name="cube.col.gender.description" value="gender"/> + <property name="base.userdim.expressions.list.size" value="0"/> + <property name="dimension.joinchain.usersports.description" value="user sports"/> + <property name="dimension.userdim.timed.dimension" value="dt"/> + <property name="dimension.joinchain.usersports.fullchain.0" + value="userdim.id.false,user_interests.user_id.true,user_interests.sport_id.false,sports.id.false"/> + <property name="cube.dimension.gender.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.age.description" value="age"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimensions/zipdim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/zipdim.xml b/lens-cube/src/test/resources/schema/dimensions/zipdim.xml new file mode 100644 index 0000000..29f3af6 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/zipdim.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension name="zipdim" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="string" name="f2" description="name"> + </dim_attribute> + <dim_attribute _type="int" name="code" description="code"> + </dim_attribute> + <dim_attribute _type="string" name="f1" description="name"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="dimension.zipdim.attributes.list0" value="f2,code,f1"/> + <property name="cube.dimension.code.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.code.description" value="code"/> + <property name="cube.dimension.f1.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.zipdim.joinchains.list.size" value="0"/> + <property name="dimension.zipdim.timed.dimension" value="dt"/> + <property name="base.zipdim.expressions.list.size" value="0"/> + <property name="cube.col.f1.description" value="name"/> + <property name="cube.table.zipdim.weight" value="0.0"/> + <property name="cube.dimension.f1.type" value="string"/> + <property name="cube.col.f2.description" value="name"/> + <property name="cube.dimension.f2.type" value="string"/> + <property name="cube.dimension.f2.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.code.type" value="int"/> + <property name="dimension.zipdim.attributes.list.size" value="1"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/citytable.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/citytable.xml b/lens-cube/src/test/resources/schema/dimtables/citytable.xml new file mode 100644 index 0000000..41ec206 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="citydim" table_name="citytable" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="stateid" _type="int" comment="state id"/> + <column name="zipcode" _type="int" comment="zip code"/> + <column name="ambigdim1" _type="string" comment="used in testColumnAmbiguity"/> + <column name="ambigdim2" _type="string" comment="used in testColumnAmbiguity"/> + </columns> + <properties> + <property name="dimension.citydim.timed.dimension" value="dt"/> + <property name="dimtble.citytable.c1.dumpperiod" value="HOURLY"/> + <property name="dimtble.citytable.storages" value="C1,C2"/> + <property name="dimtble.citytable.dim.name" value="citydim"/> + <property name="cube.table.citytable.weight" value="0.0"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="lens.metastore.table.storage.cost" value="100"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C6</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="lens.metastore.table.storage.cost" value="100"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/citytable2.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/citytable2.xml b/lens-cube/src/test/resources/schema/dimtables/citytable2.xml new file mode 100644 index 0000000..0ea0911 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable2.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="citydim" table_name="citytable2" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="stateid" _type="int" comment="state id"/> + </columns> + <properties> + <property name="dimension.citydim.timed.dimension" value="dt"/> + <property name="cube.table.citytable2.weight" value="0.0"/> + <property name="dimtble.citytable2.storages" value="C4"/> + <property name="dimtble.citytable2.dim.name" value="citydim"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C4</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/citytable3.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/citytable3.xml b/lens-cube/src/test/resources/schema/dimtables/citytable3.xml new file mode 100644 index 0000000..2b895aa --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable3.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="citydim" table_name="citytable3" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="name"/> + </columns> + <properties> + <property name="dimension.citydim.timed.dimension" value="dt"/> + <property name="dimtble.citytable3.dim.name" value="citydim"/> + <property name="cube.table.citytable3.weight" value="0.0"/> + <property name="dimtble.citytable3.storages" value="C4"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C4</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/citytable4.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/citytable4.xml b/lens-cube/src/test/resources/schema/dimtables/citytable4.xml new file mode 100644 index 0000000..43881bf --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable4.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="citydim" table_name="citytable4" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + </columns> + <properties> + <property name="cube.table.citytable4.weight" value="0.0"/> + <property name="dimension.citydim.timed.dimension" value="dt"/> + <property name="dimtble.citytable4.dim.name" value="citydim"/> + <property name="dimtble.citytable4.storages" value="C4"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C4</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/countrytable.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/countrytable.xml b/lens-cube/src/test/resources/schema/dimtables/countrytable.xml new file mode 100644 index 0000000..4a7b3f5 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/countrytable.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="countrydim" table_name="countrytable" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="capital" _type="string" comment="field2"/> + <column name="region" _type="string" comment="region name"/> + <column name="ambigdim2" _type="string" comment="used in testColumnAmbiguity"/> + </columns> + <properties> + <property name="dimtble.countrytable.dim.name" value="countrydim"/> + <property name="dimension.countrydim.timed.dimension" value="dt"/> + <property name="cube.table.countrytable.weight" value="0.0"/> + <property name="dimtble.countrytable.storages" value="C1"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/countrytable_partitioned.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/countrytable_partitioned.xml b/lens-cube/src/test/resources/schema/dimtables/countrytable_partitioned.xml new file mode 100644 index 0000000..2c3de87 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/countrytable_partitioned.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="countrydim" table_name="countrytable_partitioned" weight="0.0" + xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="capital" _type="string" comment="field2"/> + <column name="ambigdim2" _type="string" comment="used in testColumnAmbiguity"/> + </columns> + <properties> + <property name="dimtble.countrytable_partitioned.dim.name" value="countrydim"/> + <property name="dimtble.countrytable_partitioned.storages" value="C3"/> + <property name="dimtble.countrytable_partitioned.c3.dumpperiod" value="HOURLY"/> + <property name="cube.table.countrytable_partitioned.weight" value="0.0"/> + <property name="dimension.countrydim.timed.dimension" value="dt"/> + <property name="dimtable.countrytable_partitioned.part.cols" value="region"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C3</storage_name> + <table_desc external="false"> + <part_cols> + <column name="region" _type="string" comment="region name"/> + </part_cols> + <table_parameters/> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/cycledim1tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/cycledim1tbl.xml b/lens-cube/src/test/resources/schema/dimtables/cycledim1tbl.xml new file mode 100644 index 0000000..5c1467c --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/cycledim1tbl.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="cycleDim1" table_name="cycledim1tbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="cyledim2id" _type="string" comment="link to cyclic dim 2"/> + </columns> + <properties> + <property name="dimension.cycledim1.timed.dimension" value="dt"/> + <property name="dimtble.cycledim1tbl.c1.dumpperiod" value="HOURLY"/> + <property name="cube.table.cycledim1tbl.weight" value="0.0"/> + <property name="dimtble.cycledim1tbl.storages" value="C1,C2"/> + <property name="dimtble.cycledim1tbl.dim.name" value="cycleDim1"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/cycledim2tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/cycledim2tbl.xml b/lens-cube/src/test/resources/schema/dimtables/cycledim2tbl.xml new file mode 100644 index 0000000..aaac96e --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/cycledim2tbl.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="cycleDim2" table_name="cycledim2tbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="cyledim1id" _type="string" comment="link to cyclic dim 1"/> + </columns> + <properties> + <property name="dimtble.cycledim2tbl.storages" value="C1,C2"/> + <property name="dimtble.cycledim2tbl.dim.name" value="cycleDim2"/> + <property name="dimtble.cycledim2tbl.c1.dumpperiod" value="HOURLY"/> + <property name="dimension.cycledim2.timed.dimension" value="dt"/> + <property name="cube.table.cycledim2tbl.weight" value="0.0"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/daydimtbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/daydimtbl.xml b/lens-cube/src/test/resources/schema/dimtables/daydimtbl.xml new file mode 100644 index 0000000..39ef456 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/daydimtbl.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="dayDim" table_name="daydimtbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="full_date" _type="string" comment="field1"/> + </columns> + <properties> + <property name="dimtble.daydimtbl.dim.name" value="dayDim"/> + <property name="dimension.daydim.timed.dimension" value="dt"/> + <property name="cube.table.daydimtbl.weight" value="0.0"/> + <property name="dimtble.daydimtbl.c3.dumpperiod" value="HOURLY"/> + <property name="dimtble.daydimtbl.storages" value="C3,C4"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C3</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C4</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/hourdimtbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/hourdimtbl.xml b/lens-cube/src/test/resources/schema/dimtables/hourdimtbl.xml new file mode 100644 index 0000000..86298d1 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/hourdimtbl.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="hourDim" table_name="hourdimtbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="full_hour" _type="string" comment="field1"/> + </columns> + <properties> + <property name="cube.table.hourdimtbl.weight" value="0.0"/> + <property name="dimtble.hourdimtbl.c3.dumpperiod" value="HOURLY"/> + <property name="dimension.hourdim.timed.dimension" value="dt"/> + <property name="dimtble.hourdimtbl.dim.name" value="hourDim"/> + <property name="dimtble.hourdimtbl.storages" value="C3,C4"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C3</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C4</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/sports_tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/sports_tbl.xml b/lens-cube/src/test/resources/schema/dimtables/sports_tbl.xml new file mode 100644 index 0000000..9dca80a --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/sports_tbl.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="sports" table_name="sports_tbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="id"/> + <column name="name" _type="string" comment="name"/> + </columns> + <properties> + <property name="dimtble.sports_tbl.storages" value="C1,C2"/> + <property name="dimtble.sports_tbl.dim.name" value="sports"/> + <property name="cube.table.sports_tbl.weight" value="0.0"/> + <property name="dimtble.sports_tbl.c2.dumpperiod" value="HOURLY"/> + <property name="dimension.sports.timed.dimension" value="dt"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/statetable.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/statetable.xml b/lens-cube/src/test/resources/schema/dimtables/statetable.xml new file mode 100644 index 0000000..58eb948 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/statetable.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="statedim" table_name="statetable" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="capital" _type="string" comment="field2"/> + <column name="countryid" _type="string" comment="region name"/> + </columns> + <properties> + <property name="dimension.statedim.timed.dimension" value="dt"/> + <property name="cube.table.statetable.weight" value="0.0"/> + <property name="dimtble.statetable.storages" value="C1"/> + <property name="dimtble.statetable.dim.name" value="statedim"/> + <property name="dimtble.statetable.c1.dumpperiod" value="HOURLY"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C6</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/statetable_partitioned.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/statetable_partitioned.xml b/lens-cube/src/test/resources/schema/dimtables/statetable_partitioned.xml new file mode 100644 index 0000000..826d8dc --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/statetable_partitioned.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="statedim" table_name="statetable_partitioned" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="capital" _type="string" comment="field2"/> + </columns> + <properties> + <property name="dimtble.statetable_partitioned.c3.dumpperiod" value="HOURLY"/> + <property name="dimension.statedim.timed.dimension" value="dt"/> + <property name="dimtble.statetable_partitioned.dim.name" value="statedim"/> + <property name="dimtble.statetable_partitioned.storages" value="C3"/> + <property name="cube.table.statetable_partitioned.weight" value="0.0"/> + <property name="dimtable.statetable_partitioned.part.cols" value="countryid"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C3</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + <column name="countryid" _type="string" comment="region name"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/testdim2tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/testdim2tbl.xml b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl.xml new file mode 100644 index 0000000..d04cb5c --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="testDim2" table_name="testdim2tbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="cityid" _type="string" comment="f-key to cityDim"/> + <column name="testdim3id" _type="string" comment="f-key to testdim3"/> + </columns> + <properties> + <property name="cube.table.testdim2tbl.weight" value="0.0"/> + <property name="dimtble.testdim2tbl.dim.name" value="testDim2"/> + <property name="dimtble.testdim2tbl.c1.dumpperiod" value="HOURLY"/> + <property name="dimtble.testdim2tbl.storages" value="C1,C2"/> + <property name="dimension.testdim2.timed.dimension" value="dt"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/testdim2tbl2.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/testdim2tbl2.xml b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl2.xml new file mode 100644 index 0000000..efc0969 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl2.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="testDim2" table_name="testdim2tbl2" weight="10.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="bigid1" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="cityid" _type="string" comment="f-key to cityDim"/> + </columns> + <properties> + <property name="dimtble.testdim2tbl2.dim.name" value="testDim2"/> + <property name="dimtble.testdim2tbl2.storages" value="C3,C1,C2"/> + <property name="cube.table.testdim2tbl2.weight" value="10.0"/> + <property name="dimension.testdim2.timed.dimension" value="dt"/> + <property name="dimtble.testdim2tbl2.c1.dumpperiod" value="HOURLY"/> + <property name="dimtble.testdim2tbl2.c3.dumpperiod" value="HOURLY"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C3</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/testdim2tbl3.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/testdim2tbl3.xml b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl3.xml new file mode 100644 index 0000000..d9b39c7 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl3.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="testDim2" table_name="testdim2tbl3" weight="20.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="bigid1" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="testdim3id" _type="string" comment="f-key to testdim3"/> + </columns> + <properties> + <property name="dimtble.testdim2tbl3.c3.dumpperiod" value="HOURLY"/> + <property name="dimtble.testdim2tbl3.c1.dumpperiod" value="HOURLY"/> + <property name="cube.table.testdim2tbl3.weight" value="20.0"/> + <property name="dimension.testdim2.timed.dimension" value="dt"/> + <property name="dimtble.testdim2tbl3.storages" value="C3,C1,C2"/> + <property name="dimtble.testdim2tbl3.dim.name" value="testDim2"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C3</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/testdim3tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/testdim3tbl.xml b/lens-cube/src/test/resources/schema/dimtables/testdim3tbl.xml new file mode 100644 index 0000000..ffd09c0 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim3tbl.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="testDim3" table_name="testdim3tbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + <column name="testdim4id" _type="string" comment="f-key to testDim4"/> + </columns> + <properties> + <property name="cube.table.testdim3tbl.weight" value="0.0"/> + <property name="dimtble.testdim3tbl.c1.dumpperiod" value="HOURLY"/> + <property name="dimension.testdim3.timed.dimension" value="dt"/> + <property name="dimtble.testdim3tbl.storages" value="C1,C2"/> + <property name="dimtble.testdim3tbl.dim.name" value="testDim3"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/testdim4tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/testdim4tbl.xml b/lens-cube/src/test/resources/schema/dimtables/testdim4tbl.xml new file mode 100644 index 0000000..d81daa7 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim4tbl.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="testDim4" table_name="testdim4tbl" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + </columns> + <properties> + <property name="dimtble.testdim4tbl.storages" value="C1,C2"/> + <property name="dimtble.testdim4tbl.c1.dumpperiod" value="HOURLY"/> + <property name="dimtble.testdim4tbl.dim.name" value="testDim4"/> + <property name="cube.table.testdim4tbl.weight" value="0.0"/> + <property name="dimension.testdim4.timed.dimension" value="dt"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + <storage_table> + <update_periods/> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/unreachabledimtable.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/unreachabledimtable.xml b/lens-cube/src/test/resources/schema/dimtables/unreachabledimtable.xml new file mode 100644 index 0000000..e940cf7 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/unreachabledimtable.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="unreachableDim" table_name="unreachabledimtable" weight="0.0" + xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="code"/> + <column name="name" _type="string" comment="field1"/> + </columns> + <properties> + <property name="dimension.unreachabledim.timed.dimension" value="dt"/> + <property name="cube.table.unreachabledimtable.weight" value="0.0"/> + <property name="dimtble.unreachabledimtable.dim.name" value="unreachableDim"/> + <property name="dimtble.unreachabledimtable.storages" value="C1"/> + <property name="dimtble.unreachabledimtable.c1.dumpperiod" value="HOURLY"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/user_interests_tbl.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/user_interests_tbl.xml b/lens-cube/src/test/resources/schema/dimtables/user_interests_tbl.xml new file mode 100644 index 0000000..cec16a5 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/user_interests_tbl.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="user_interests" table_name="user_interests_tbl" weight="0.0" + xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="id"/> + <column name="user_id" _type="int" comment="user id"/> + <column name="sport_id" _type="int" comment="sport id"/> + </columns> + <properties> + <property name="dimtble.user_interests_tbl.storages" value="C1,C2"/> + <property name="dimtble.user_interests_tbl.c2.dumpperiod" value="HOURLY"/> + <property name="dimension.user_interests.timed.dimension" value="dt"/> + <property name="dimtble.user_interests_tbl.dim.name" value="user_interests"/> + <property name="cube.table.user_interests_tbl.weight" value="0.0"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/usertable.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/usertable.xml b/lens-cube/src/test/resources/schema/dimtables/usertable.xml new file mode 100644 index 0000000..de2083d --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/usertable.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="userdim" table_name="usertable" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="id" _type="int" comment="id"/> + <column name="name" _type="string" comment="name"/> + <column name="age" _type="string" comment="age"/> + <column name="gender" _type="string" comment="gender"/> + <column name="user_id_added_in_past" _type="int" comment="user_id_added_in_past"/> + <column name="user_id_added_far_future" _type="int" comment="user_id_added_far_future"/> + </columns> + <properties> + <property name="dimtble.usertable.dim.name" value="userdim"/> + <property name="dimension.userdim.timed.dimension" value="dt"/> + <property name="dimtble.usertable.storages" value="C1,C2"/> + <property name="cube.table.usertable.weight" value="0.0"/> + <property name="dimtble.usertable.c2.dumpperiod" value="HOURLY"/> + </properties> + <storage_tables> + <storage_table> + <update_periods/> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols/> + <table_parameters> + <property name="totalSize" value="0"/> + <property name="numFiles" value="0"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + </table_desc> + </storage_table> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C2</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/ae83caae/lens-cube/src/test/resources/schema/dimtables/ziptable.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimtables/ziptable.xml b/lens-cube/src/test/resources/schema/dimtables/ziptable.xml new file mode 100644 index 0000000..7287886 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/ziptable.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<x_dimension_table dimension_name="zipdim" table_name="ziptable" weight="0.0" xmlns="uri:lens:cube:0.1"> + <columns> + <column name="code" _type="int" comment="code"/> + <column name="f1" _type="string" comment="field1"/> + <column name="f2" _type="string" comment="field2"/> + </columns> + <properties> + <property name="dimtble.ziptable.c1.dumpperiod" value="HOURLY"/> + <property name="cube.table.ziptable.weight" value="0.0"/> + <property name="dimtble.ziptable.dim.name" value="zipdim"/> + <property name="dimtble.ziptable.storages" value="C1"/> + <property name="dimension.zipdim.timed.dimension" value="dt"/> + </properties> + <storage_tables> + <storage_table> + <update_periods> + <update_period>HOURLY</update_period> + </update_periods> + <storage_name>C1</storage_name> + <table_desc external="false"> + <part_cols> + <column name="dt" _type="string" comment="date partition"/> + </part_cols> + <table_parameters> + <property name="cube.storagetable.time.partcols" value="dt"/> + </table_parameters> + <serde_parameters> + <property name="serialization.format" value="1"/> + </serde_parameters> + <time_part_cols>dt</time_part_cols> + </table_desc> + </storage_table> + </storage_tables> +</x_dimension_table> \ No newline at end of file