Created
January 20, 2016 10:05
-
-
Save buggtb/6173b6ed547e0be77ce4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Schema name="FoodMart Test" missingLink="ignore" metamodelVersion="4.300"> | |
<PhysicalSchema> | |
<Table name="sales_fact_1997" alias="sales_fact_1997"> | |
<ColumnDefs> | |
<CalculatedColumnDef name="calc$9" type="Numeric"> | |
<ExpressionView> | |
<SQL dialect="mysql"> | |
<![CDATA[extract(YEAR from the_date)]]> | |
</SQL> | |
</ExpressionView> | |
</CalculatedColumnDef> | |
</ColumnDefs> | |
<Key name="key$0"> | |
<Column table="sales_fact_1997" name="the_date"> | |
</Column> | |
</Key> | |
</Table> | |
<Table name="customer" alias="customer"> | |
<ColumnDefs> | |
</ColumnDefs> | |
<Key name="key$0"> | |
<Column table="customer" name="customer_id"> | |
</Column> | |
</Key> | |
</Table> | |
<Link source="customer" target="sales_fact_1997" key="key$0"> | |
<ForeignKey> | |
<Column table="sales_fact_1997" name="customer_id"> | |
</Column> | |
</ForeignKey> | |
</Link> | |
<Link source="sales_fact_1997" target="sales_fact_1997" key="key$0"> | |
<ForeignKey> | |
<Column table="sales_fact_1997" name="the_date"> | |
</Column> | |
</ForeignKey> | |
</Link> | |
</PhysicalSchema> | |
<Cube name="Sales" visible="true" defaultMeasure="Unit Sales" cache="true" enabled="true" enableScenarios="false"> | |
<Dimensions> | |
<Dimension name="Customers" visible="true" key="$Id" hanger="false"> | |
<Hierarchies> | |
<Hierarchy name="Customers" visible="true" hasAll="true" allMemberName="All Customers"> | |
<Level name="Country" visible="true" attribute="Country" hideMemberIf="Never"> | |
</Level> | |
<Level name="State Province" visible="true" attribute="State Province" hideMemberIf="Never"> | |
</Level> | |
<Level name="City" visible="true" attribute="City" hideMemberIf="Never"> | |
</Level> | |
</Hierarchy> | |
</Hierarchies> | |
<Attributes> | |
<Attribute name="Country" levelType="Regular" table="customer" datatype="String" hasHierarchy="false"> | |
<Key> | |
<Column table="customer" name="country"> | |
</Column> | |
</Key> | |
</Attribute> | |
<Attribute name="State Province" levelType="Regular" table="customer" datatype="String" hasHierarchy="false"> | |
<Key> | |
<Column table="customer" name="state_province"> | |
</Column> | |
</Key> | |
</Attribute> | |
<Attribute name="City" levelType="Regular" table="customer" datatype="String" hasHierarchy="false"> | |
<Key> | |
<Column table="customer" name="state_province"> | |
</Column> | |
<Column table="customer" name="city"> | |
</Column> | |
</Key> | |
<Name> | |
<Column table="customer" name="city"> | |
</Column> | |
</Name> | |
</Attribute> | |
<Attribute name="$Id" levelType="Regular" table="customer" keyColumn="customer_id" hasHierarchy="false"> | |
</Attribute> | |
</Attributes> | |
</Dimension> | |
<Dimension name="Test Date" visible="true" key="$Id" hanger="false"> | |
<Hierarchies> | |
<Hierarchy name="Test Date" visible="true" hasAll="true"> | |
<Level name="Year" visible="true" attribute="Year" hideMemberIf="Never"> | |
</Level> | |
</Hierarchy> | |
</Hierarchies> | |
<Attributes> | |
<Attribute name="Year" levelType="Regular" table="sales_fact_1997" datatype="Numeric" hasHierarchy="false"> | |
<Key> | |
<Column table="sales_fact_1997" name="calc$9"> | |
</Column> | |
</Key> | |
</Attribute> | |
<Attribute name="$Id" levelType="Regular" table="sales_fact_1997" keyColumn="the_date" hasHierarchy="false"> | |
</Attribute> | |
</Attributes> | |
</Dimension> | |
</Dimensions> | |
<MeasureGroups> | |
<MeasureGroup name="Sales" type="fact" table="sales_fact_1997"> | |
<Measures> | |
<Measure name="Unit Sales" formatString="Standard" aggregator="sum"> | |
<Arguments> | |
<Column table="sales_fact_1997" name="unit_sales"> | |
</Column> | |
</Arguments> | |
</Measure> | |
</Measures> | |
<DimensionLinks> | |
<ForeignKeyLink dimension="Customers"> | |
<ForeignKey> | |
<Column table="sales_fact_1997" name="customer_id"> | |
</Column> | |
</ForeignKey> | |
</ForeignKeyLink> | |
<FactLink dimension="Test Date"> | |
</FactLink> | |
</DimensionLinks> | |
</MeasureGroup> | |
</MeasureGroups> | |
<CalculatedMembers> | |
<CalculatedMember name="Test Measure" dimension="Measures"> | |
<Formula> | |
[Measures].[Unit Sales]*100 </Formula> | |
<CalculatedMemberProperty name="FORMAT_STRING" value="#,##0.00"> | |
</CalculatedMemberProperty> | |
</CalculatedMember> | |
</CalculatedMembers> | |
</Cube> | |
</Schema> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment