http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/countrydim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/countrydim.xml b/lens-cube/src/test/resources/schema/dimensions/countrydim.xml new file mode 100644 index 0000000..1e95416 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/countrydim.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="countrydim" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="string" name="captial" description="field2"> + </dim_attribute> + <dim_attribute _type="string" name="region" description="region name"> + </dim_attribute> + <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="ambigdim2" description="used in testColumnAmbiguity"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="cube.table.countrydim.weight" value="0.0"/> + <property name="dimension.countrydim.timed.dimension" value="dt"/> + </properties> +</x_dimension>
http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/cycledim1.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/cycledim1.xml b/lens-cube/src/test/resources/schema/dimensions/cycledim1.xml new file mode 100644 index 0000000..a9cc3ae --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/cycledim1.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="cycledim1" 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="cyledim2id" description="link to cyclic dim 2"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains> + <join_chain dest_table="cycledim2" name="cycledim2chain" display_string="cycledim2chain" + description="cycledim2chain"> + <paths> + <path> + <edges> + <edge> + <from table="cycledim1" column="cyledim2id" maps_to_many="false"/> + <to table="cycledim2" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + </join_chains> + <properties> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.cycledim1.timed.dimension" value="dt"/> + <property name="dimension.joinchain.cycledim2chain.displaystring" value="cycledim2chain"/> + <property name="dimension.joinchain.cycledim2chain.numchains" value="1"/> + <property name="transient_lastDdlTime" value="1488895853"/> + <property name="dimension.cycledim1.joinchains.list.size" value="1"/> + <property name="cube.col.cyledim2id.description" value="link to cyclic dim 2"/> + <property name="base.cycledim1.expressions.list.size" value="0"/> + <property name="dimension.cycledim1.joinchains.list0" value="cycledim2chain"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.cycledim1.attributes.list0" value="id,name,cyledim2id"/> + <property name="dimension.cycledim1.attributes.list.size" 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.table.cycledim1.weight" value="0.0"/> + <property name="dimension.joinchain.cycledim2chain.description" value="cycledim2chain"/> + <property name="cube.dimension.cyledim2id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.name.type" value="string"/> + <property name="cube.dimension.cyledim2id.type" value="string"/> + <property name="dimension.joinchain.cycledim2chain.fullchain.0" + value="cycledim1.cyledim2id.false,cycledim2.id.false"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/cycledim2.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/cycledim2.xml b/lens-cube/src/test/resources/schema/dimensions/cycledim2.xml new file mode 100644 index 0000000..b714f50 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/cycledim2.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="cycledim2" 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="cyledim1id" description="link to cyclic dim 1"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains> + <join_chain dest_table="cycledim1" name="cycledim1chain" display_string="cycledim1chain" + description="cycledim1chain"> + <paths> + <path> + <edges> + <edge> + <from table="cycledim2" column="cyledim1id" maps_to_many="false"/> + <to table="cycledim1" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + </join_chains> + <properties> + <property name="cube.col.cyledim1id.description" value="link to cyclic dim 1"/> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.joinchain.cycledim1chain.fullchain.0" + value="cycledim2.cyledim1id.false,cycledim1.id.false"/> + <property name="dimension.joinchain.cycledim1chain.displaystring" value="cycledim1chain"/> + <property name="cube.table.cycledim2.weight" value="0.0"/> + <property name="dimension.cycledim2.attributes.list0" value="id,name,cyledim1id"/> + <property name="dimension.joinchain.cycledim1chain.description" value="cycledim1chain"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.cycledim2.joinchains.list.size" value="1"/> + <property name="dimension.joinchain.cycledim1chain.numchains" value="1"/> + <property name="cube.dimension.cyledim1id.type" value="string"/> + <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="base.cycledim2.expressions.list.size" value="0"/> + <property name="dimension.cycledim2.joinchains.list0" value="cycledim1chain"/> + <property name="dimension.cycledim2.timed.dimension" value="dt"/> + <property name="cube.dimension.cyledim1id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.cycledim2.attributes.list.size" value="1"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/daydim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/daydim.xml b/lens-cube/src/test/resources/schema/dimensions/daydim.xml new file mode 100644 index 0000000..0ba6cee --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/daydim.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="daydim" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="boolean" name="is_weekend" description="is weekend?"> + </dim_attribute> + <dim_attribute _type="int" name="day_number_of_year" description="day number in year"> + </dim_attribute> + <dim_attribute _type="int" name="id" description="code"> + </dim_attribute> + <dim_attribute _type="string" name="full_date" description="full date"> + </dim_attribute> + <dim_attribute _type="int" name="calendar_quarter" description="quarter id"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="cube.col.is_weekend.description" value="is weekend?"/> + <property name="cube.dimension.calendar_quarter.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.id.type" value="int"/> + <property name="cube.table.daydim.weight" value="0.0"/> + <property name="cube.col.calendar_quarter.description" value="quarter id"/> + <property name="base.daydim.expressions.list.size" value="0"/> + <property name="dimension.daydim.attributes.list.size" value="1"/> + <property name="cube.dimension.day_number_of_year.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.day_number_of_year.type" value="int"/> + <property name="cube.dimension.is_weekend.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.full_date.description" value="full date"/> + <property name="cube.col.id.description" value="code"/> + <property name="dimension.daydim.timed.dimension" value="dt"/> + <property name="cube.dimension.is_weekend.type" value="boolean"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.full_date.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.full_date.type" value="string"/> + <property name="cube.col.day_number_of_year.description" value="day number in year"/> + <property name="cube.dimension.calendar_quarter.type" value="int"/> + <property name="dimension.daydim.attributes.list0" + value="is_weekend,day_number_of_year,id,full_date,calendar_quarter"/> + <property name="dimension.daydim.joinchains.list.size" value="0"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/hourdim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/hourdim.xml b/lens-cube/src/test/resources/schema/dimensions/hourdim.xml new file mode 100644 index 0000000..c7bf7fb --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/hourdim.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="hourdim" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="string" name="full_hour" description="full date"> + </dim_attribute> + <dim_attribute _type="int" name="id" description="code"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.hourdim.timed.dimension" value="dt"/> + <property name="base.hourdim.expressions.list.size" value="0"/> + <property name="cube.dimension.full_hour.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.table.hourdim.weight" value="0.0"/> + <property name="dimension.hourdim.attributes.list0" value="full_hour,id"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.col.full_hour.description" value="full date"/> + <property name="dimension.hourdim.attributes.list.size" value="1"/> + <property name="dimension.hourdim.joinchains.list.size" value="0"/> + <property name="cube.dimension.full_hour.type" value="string"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/sports.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/sports.xml b/lens-cube/src/test/resources/schema/dimensions/sports.xml new file mode 100644 index 0000000..d237069 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/sports.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="sports" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="string" name="name" description="name"> + </dim_attribute> + <dim_attribute _type="int" name="id" description="id"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains/> + <properties> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.sports.attributes.list.size" value="1"/> + <property name="dimension.sports.attributes.list0" value="name,id"/> + <property name="cube.table.sports.weight" value="0.0"/> + <property name="cube.col.id.description" value="id"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="base.sports.expressions.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"/> + <property name="dimension.sports.timed.dimension" value="dt"/> + <property name="dimension.sports.joinchains.list.size" value="0"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/statedim.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/statedim.xml b/lens-cube/src/test/resources/schema/dimensions/statedim.xml new file mode 100644 index 0000000..ab55bdf --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/statedim.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="statedim" 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="countryid" description="link to country table"> + </dim_attribute> + <dim_attribute _type="string" name="capital" description="field2"> + </dim_attribute> + </attributes> + <expressions/> + <join_chains> + <join_chain dest_table="country" name="countrychain" display_string="countrychain" description="countrychain"> + <paths> + <path> + <edges> + <edge> + <from table="statedim" column="countryid" maps_to_many="false"/> + <to table="country" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + </join_chains> + <properties> + <property name="dimension.joinchain.countrychain.displaystring" value="countrychain"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.col.capital.description" value="field2"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.joinchain.countrychain.fullchain.0" value="statedim.countryid.false,country.id.false"/> + <property name="cube.dimension.capital.type" value="string"/> + <property name="dimension.joinchain.countrychain.description" value="countrychain"/> + <property name="cube.col.name.description" value="name"/> + <property name="cube.dimension.id.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.statedim.attributes.list.size" value="1"/> + <property name="cube.dimension.name.type" value="string"/> + <property name="cube.dimension.capital.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.id.type" value="int"/> + <property name="dimension.statedim.timed.dimension" value="dt"/> + <property name="cube.table.statedim.weight" value="0.0"/> + <property name="cube.col.countryid.description" value="link to country table"/> + <property name="dimension.statedim.attributes.list0" value="id,name,countryid,capital"/> + <property name="dimension.statedim.joinchains.list.size" value="1"/> + <property name="cube.dimension.countryid.type" value="string"/> + <property name="cube.dimension.countryid.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="base.statedim.expressions.list.size" value="0"/> + <property name="dimension.statedim.joinchains.list0" value="countrychain"/> + <property name="dimension.joinchain.countrychain.numchains" value="1"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/lens-cube/src/test/resources/schema/dimensions/testdim2.xml ---------------------------------------------------------------------- diff --git a/lens-cube/src/test/resources/schema/dimensions/testdim2.xml b/lens-cube/src/test/resources/schema/dimensions/testdim2.xml new file mode 100644 index 0000000..65ebc3f --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/testdim2.xml @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<x_dimension name="testdim2" xmlns="uri:lens:cube:0.1"> + <attributes> + <dim_attribute _type="bigint" name="bigidnew" description="big id"> + </dim_attribute> + <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="unreachablename" display_string="urdim name" description=""> + <chain_ref_column chain_name="unreachabledim_chain" ref_col="name" dest_table="unreachabledim"/> + </dim_attribute> + <dim_attribute _type="string" name="cityname" display_string="cityname" description="name"> + <chain_ref_column chain_name="dim2city" ref_col="name" dest_table="citydim"/> + </dim_attribute> + <dim_attribute _type="string" name="testdim3id" display_string="dim3 refer" description="f-key to testdim3"> + <chain_ref_column chain_name="dim3chain" ref_col="id" dest_table="testdim3"/> + </dim_attribute> + <dim_attribute _type="int" name="urdimid" display_string="urdim refer" description="ref dim"> + </dim_attribute> + <dim_attribute _type="bigint" name="bigid1" description="big id"> + </dim_attribute> + <dim_attribute _type="bigint" name="bigid2" description="big id"> + </dim_attribute> + <dim_attribute _type="string" name="cityid" description="f-key to citydim"> + </dim_attribute> + <dim_attribute _type="string" name="citystatecapital" display_string="State's capital thru city" + description="State's capital thru city"> + <chain_ref_column chain_name="citystate" ref_col="capital" dest_table="statedim"/> + </dim_attribute> + </attributes> + <expressions/> + <join_chains> + <join_chain dest_table="citydim" name="dim2city" display_string="dim2-city" description="city thru dim2"> + <paths> + <path> + <edges> + <edge> + <from table="testdim2" column="cityid" maps_to_many="false"/> + <to table="citydim" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + <join_chain dest_table="testdim3" name="dim3chain" display_string="dim3-chain" description="dim3 thru dim2"> + <paths> + <path> + <edges> + <edge> + <from table="testdim2" column="testdim3id" maps_to_many="false"/> + <to table="testdim3" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + <join_chain dest_table="testdim4" name="dim4chain" display_string="cube-testdim3" description="cyclicdim thru cube"> + <paths> + <path> + <edges> + <edge> + <from table="testdim2" column="testdim3id" maps_to_many="false"/> + <to table="testdim3" column="id" maps_to_many="false"/> + </edge> + <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_chain dest_table="statedim" name="citystate" display_string="city-state" description="state thru city"> + <paths> + <path> + <edges> + <edge> + <from table="testdim2" column="cityid" maps_to_many="false"/> + <to table="citydim" column="id" maps_to_many="false"/> + </edge> + <edge> + <from table="citydim" column="stateid" maps_to_many="false"/> + <to table="statedim" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + <path> + <edges> + <edge> + <from table="testdim2" column="cityid" maps_to_many="false"/> + <to table="citydim" column="id" maps_to_many="false"/> + </edge> + <edge> + <from table="citydim" column="statename" maps_to_many="false"/> + <to table="statedim" column="name" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + <join_chain dest_table="unreachabledim" name="unreachabledim_chain" display_string="dim2-unreachableDim" + description="unreachableDim thru dim2"> + <paths> + <path> + <edges> + <edge> + <from table="testdim2" column="urdimid" maps_to_many="false"/> + <to table="unreachabledim" column="id" maps_to_many="false"/> + </edge> + </edges> + </path> + </paths> + </join_chain> + </join_chains> + <properties> + <property name="cube.dimension.urdimid.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.joinchain.citystate.description" value="state thru city"/> + <property name="cube.col.testdim3id.displaystring" value="dim3 refer"/> + <property name="cube.dimension.citystatecapital.type" value="string"/> + <property name="cube.dimension.unreachablename.class" value="org.apache.lens.cube.metadata.ReferencedDimAttribute"/> + <property name="cube.col.cityid.description" value="f-key to citydim"/> + <property name="cube.col.id.description" value="code"/> + <property name="cube.dimension.bigidnew.type" value="bigint"/> + <property name="dimension.joinchain.citystate.fullchain.0" + value="testdim2.cityid.false,citydim.id.false,citydim.stateid.false,statedim.id.false"/> + <property name="cube.dimension.cityid.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.joinchain.citystate.fullchain.1" + value="testdim2.cityid.false,citydim.id.false,citydim.statename.false,statedim.name.false"/> + <property name="dimension.testdim2.attributes.list0" + value="bigidnew,id,name,unreachablename,cityname,testdim3id,urdimid,bigid1,bigid2,cityid,citystatecapital"/> + <property name="dimension.joinchain.dim3chain.displaystring" value="dim3-chain"/> + <property name="cube.col.cityname.description" value="name"/> + <property name="cube.col.citystatecapital.description" value="State's capital thru city"/> + <property name="cube.col.testdim3id.description" value="f-key to testdim3"/> + <property name="cube.dimension.cityname.class" value="org.apache.lens.cube.metadata.ReferencedDimAttribute"/> + <property name="dimension.joinchain.dim2city.fullchain.0" value="testdim2.cityid.false,citydim.id.false"/> + <property name="cube.col.bigidnew.description" value="big id"/> + <property name="dimension.joinchain.unreachabledim_chain.description" value="unreachableDim thru dim2"/> + <property name="cube.col.cityname.displaystring" value="cityname"/> + <property name="dimension.joinchain.citystate.displaystring" value="city-state"/> + <property name="cube.col.bigid1.description" value="big id"/> + <property name="cube.col.bigid2.description" value="big id"/> + <property name="cube.dimension.id.type" value="int"/> + <property name="cube.dimension.cityid.type" value="string"/> + <property name="dimension.joinchain.unreachabledim_chain.fullchain.0" + value="testdim2.urdimid.false,unreachabledim.id.false"/> + <property name="cube.table.testdim2.weight" value="0.0"/> + <property name="cube.dimension.cityname.chain.column.name" value="name"/> + <property name="dimension.joinchain.dim4chain.description" value="cyclicdim thru cube"/> + <property name="cube.dimension.unreachablename.chain.column.name" value="name"/> + <property name="cube.dimension.bigid2.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.unreachablename.type" value="string"/> + <property name="dimension.joinchain.dim4chain.numchains" value="1"/> + <property name="dimension.joinchain.dim3chain.fullchain.0" value="testdim2.testdim3id.false,testdim3.id.false"/> + <property name="dimension.testdim2.joinchains.list.size" value="1"/> + <property name="cube.col.unreachablename.description" value=""/> + <property name="dimension.joinchain.unreachabledim_chain.displaystring" value="dim2-unreachableDim"/> + <property name="dimension.joinchain.dim3chain.numchains" value="1"/> + <property name="cube.dimension.testdim3id.chain.column.name" value="id"/> + <property name="cube.dimension.testdim3id.type" value="string"/> + <property name="dimension.joinchain.citystate.numchains" value="2"/> + <property name="dimension.joinchain.dim3chain.description" value="dim3 thru dim2"/> + <property name="dimension.joinchain.dim4chain.fullchain.0" + value="testdim2.testdim3id.false,testdim3.id.false,testdim3.testdim4id.false,testdim4.id.false"/> + <property name="cube.col.cityname.cost" value="0.0"/> + <property name="cube.dimension.bigid2.type" value="bigint"/> + <property name="cube.dimension.bigid1.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.testdim3id.class" value="org.apache.lens.cube.metadata.ReferencedDimAttribute"/> + <property name="dimension.joinchain.unreachabledim_chain.numchains" value="1"/> + <property name="cube.col.testdim3id.cost" value="0.0"/> + <property name="cube.dimension.name.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="cube.dimension.cityname.type" value="string"/> + <property name="cube.dimension.citystatecapital.class" + value="org.apache.lens.cube.metadata.ReferencedDimAttribute"/> + <property name="cube.col.urdimid.displaystring" value="urdim refer"/> + <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.urdimid.cost" value="10.0"/> + <property name="cube.dimension.cityname.chain.name" value="dim2city"/> + <property name="cube.dimension.testdim3id.chain.name" value="dim3chain"/> + <property name="dimension.joinchain.dim2city.description" value="city thru dim2"/> + <property name="dimension.joinchain.dim4chain.displaystring" value="cube-testdim3"/> + <property name="dimension.testdim2.timed.dimension" value="dt"/> + <property name="cube.dimension.bigidnew.class" value="org.apache.lens.cube.metadata.BaseDimAttribute"/> + <property name="dimension.joinchain.dim2city.numchains" value="1"/> + <property name="dimension.testdim2.attributes.list.size" value="1"/> + <property name="cube.col.urdimid.description" value="ref dim"/> + <property name="cube.dimension.citystatecapital.chain.column.name" value="capital"/> + <property name="dimension.testdim2.joinchains.list0" + value="dim2city,dim3chain,dim4chain,citystate,unreachabledim_chain"/> + <property name="cube.col.unreachablename.displaystring" value="urdim name"/> + <property name="cube.dimension.urdimid.type" value="int"/> + <property name="base.testdim2.expressions.list.size" value="0"/> + <property name="cube.col.unreachablename.cost" value="10.0"/> + <property name="dimension.joinchain.dim2city.displaystring" value="dim2-city"/> + <property name="cube.dimension.citystatecapital.chain.name" value="citystate"/> + <property name="cube.dimension.bigid1.type" value="bigint"/> + <property name="cube.col.citystatecapital.displaystring" value="State's capital thru city"/> + <property name="cube.dimension.unreachablename.chain.name" value="unreachabledim_chain"/> + </properties> +</x_dimension> http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/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..c9003f8 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/testdim3.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..a5024da --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/testdim4.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..5e4ff70 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/unreachabledim.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..caadf91 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/user_interests.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..0ffbb6f --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/userdim.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..22755ca --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimensions/zipdim.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..507369a --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/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..7b9ef97 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable2.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..f599eb2 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable3.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..2b70995 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/citytable4.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..a82d7bc --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/countrytable.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..ecf88ac --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/countrytable_partitioned.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..902696a --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/cycledim1tbl.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..63a0975 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/cycledim2tbl.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..c1e16bf --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/daydimtbl.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..c759704 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/hourdimtbl.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..44420ac --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/sports_tbl.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..2aab131 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/statetable.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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_tables> +</x_dimension_table> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lens/blob/112af59c/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..e7c808f --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/statetable_partitioned.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..b320ec2 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..2239997 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl2.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..62059ad --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim2tbl3.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..7d2af60 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim3tbl.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..2044851 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/testdim4tbl.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..6f80c27 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/unreachabledimtable.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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/112af59c/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..e0fa4e3 --- /dev/null +++ b/lens-cube/src/test/resources/schema/dimtables/user_interests_tbl.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<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
