You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ja...@hotwaxmedia.com> on 2009/11/22 12:49:24 UTC

Re: svn commit: r883034 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_olap.xml ofbiz-component.xml

Hi Hans,

it is great to see some interest in this area of the project!
I had not time to review this (but I will do for sure) but one think that is missing here are the entries for the new entities in the entitygroup_olap.xml file:

    <entity-group group="org.ofbiz.olap" entity="SalesInvoiceItemFact"/>
etc...

I guess that you have just forgotten to commit that file.

Cheers,

Jacopo


On Nov 22, 2009, at 5:37 AM, hansbak@apache.org wrote:

> Author: hansbak
> Date: Sun Nov 22 04:37:27 2009
> New Revision: 883034
> 
> URL: http://svn.apache.org/viewvc?rev=883034&view=rev
> Log:
> A first proposal open for comments of the order OLAP entities. secas and initial load are on the way and implemeted following the same pattern as Jacopo's accounting entities
> 
> Added:
>    ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml   (with props)
> Modified:
>    ofbiz/trunk/applications/order/ofbiz-component.xml
> 
> Added: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml?rev=883034&view=auto
> ==============================================================================
> --- ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml (added)
> +++ ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml Sun Nov 22 04:37:27 2009
> @@ -0,0 +1,203 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<!--
> +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.
> +-->
> +
> +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
> +    <!-- ========================================================= -->
> +    <!-- ======================== Defaults ======================= -->
> +    <!-- ========================================================= -->
> +    <title>OLAP entities for the Order component</title>
> +    <description>None</description>
> +    <copyright>Copyright 2001-2007 The Apache Software Foundation</copyright>
> +
> +    <!-- ========================================================= -->
> +    <!-- Facts                                                     -->
> +    <!-- ========================================================= -->
> +    <entity entity-name="SalesOrderItemFact" package-name="org.ofbiz.bi.fact.order" title="Sales Order Item Fact">
> +        <description>A transaction fact entity with order item grain.</description>
> +        <field name="orderId" type="id-ne"></field> <!-- degenerate dimension -->
> +        <field name="orderItemSeqId" type="id-ne"></field> <!-- degenerate dimension -->
> +        <field name="orderDateDimId" type="id-ne"></field>
> +        <field name="productDimId" type="id-ne"></field>
> +        <field name="origCurrencyDimId" type="id-ne"></field>
> +        <field name="billToCustomerDimId" type="id-ne"></field> <!-- TODO: implement the dimension -->
> +
> +        <field name="quantity" type="fixed-point">
> +            <description>Quantity order. From OrderItem.quantity</description>
> +        </field>
> +        
> +        <field name="extGrossAmount" type="currency-precise">
> +            <description>Extended gross amount: quantity item multiplied by the unit price.</description>
> +        </field>
> +        <field name="extDiscountAmount" type="currency-precise">
> +            <description>Extended discount amount.</description>
> +        </field>
> +        <field name="extNetAmount" type="currency-precise">
> +            <description>Extended net amount: gross amount less discounts.</description>
> +        </field>
> +        <field name="extShippingAmount" type="currency-precise">
> +            <description>Extended shipping amount.</description>
> +        </field>
> +        <field name="extTaxAmount" type="currency-precise">
> +            <description>Extended tax amount.</description>
> +        </field>
> +        
> +        <field name="GrossSales" type="currency-precise">
> +            <description>Gross Sales</description>
> +        </field>
> +        <field name="GrossMerchandizeSales" type="currency-precise">
> +            <description>Gross Merchandize Sales</description>
> +        </field>
> +        <field name="GrossMerchandizeProfit" type="currency-precise">
> +            <description>Gross Merchandize Profit</description>
> +        </field>
> +        <field name="GrossShippingProfit" type="currency-precise">
> +            <description>Gross Shipping Profit</description>
> +        </field>
> +        <field name="GrossProfit" type="currency-precise">
> +            <description>Gross Profit</description>
> +        </field>
> +        <field name="AverageMerchandizeProfit" type="currency-precise">
> +            <description>Average Merchandize Profit</description>
> +        </field>
> +        <field name="AverageGrossProfit" type="currency-precise">
> +            <description>Average Gross Profit</description>
> +        </field>
> +
> +        <!--<field name="extGrossAmount" type="currency-precise">
> +            <description>Extended gross amount: quantity invoiced multiplied by the list unit price.</description>
> +        </field>
> +        <field name="extDiscountAmount" type="currency-precise">
> +            <description>Extended discount amount.</description>
> +        </field>
> +        <field name="extNetAmount" type="currency-precise">
> +            <description>Extended net amount: gross amount less discounts.</description>
> +        </field>
> +        <field name="extShippingAmount" type="currency-precise">
> +        <description>Extended shipping amount.</description>
> +        </field>
> +        <field name="extTaxAmount" type="currency-precise">
> +            <description>Extended tax amount.</description>
> +        </field>
> +        <field name="extManFixedCost" type="currency-precise">
> +            <description>Extended manufacturing fixed cost.</description>
> +        </field>
> +        <field name="extManVarCost" type="currency-precise">
> +            <description>Extended manufacturing variable cost.</description>
> +        </field>
> +        <field name="extStorageCost" type="currency-precise">
> +            <description>Extended storage cost.</description>
> +        </field>
> +        <field name="extDistributionCost" type="currency-precise">
> +            <description>Extended distribution cost.</description>
> +        </field>
> +        <field name="contributionAmount" type="currency-precise">
> +            <description>Extended net amount less all the costs.</description>
> +        </field>-->
> +        <!--
> +        TODO: implement multi-currency fields
> +        <field name="extGrossAmountOrig" type="currency-precise">
> +            <description>Extended gross amount in the original currency: quantity invoiced multiplied by the list unit price.</description>
> +        </field>
> +        <field name="extDiscountAmountOrig" type="currency-precise">
> +            <description>Extended discount amount in the original currency.</description>
> +        </field>
> +        <field name="extNetAmountOrig" type="currency-precise">
> +            <description>Extended net amount in the original currency: gross amount less discounts.</description>
> +        </field>
> +        <field name="extManFixedCostOrig" type="currency-precise">
> +            <description>Extended manufacturing fixed cost in the original currency.</description>
> +        </field>
> +        <field name="extManVarCostOrig" type="currency-precise">
> +            <description>Extended manufacturing variable cost in the original currency.</description>
> +        </field>
> +        <field name="extStorageCostOrig" type="currency-precise">
> +            <description>Extended storage cost in the original currency.</description>
> +        </field>
> +        <field name="extDistributionCostOrig" type="currency-precise">
> +            <description>Extended distribution cost in the original currency.</description>
> +        </field>
> +        <field name="contributionAmountOrig" type="currency-precise">
> +            <description>Extended net amount less all the costs in the original currency.</description>
> +        </field>
> +        -->
> +
> +        <prim-key field="orderId"/>
> +        <prim-key field="orderItemSeqId"/>
> +
> +        <relation type="one" fk-name="SIIF_INVDATE" rel-entity-name="DateDimension">
> +            <key-map field-name="invoiceDateDimId" rel-field-name="dimensionId"/>
> +        </relation>
> +        <relation type="one" fk-name="SIIF_CURRENCY" rel-entity-name="CurrencyDimension">
> +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
> +        </relation>
> +        <relation type="one" fk-name="SIIF_PRODUCT" rel-entity-name="ProductDimension">
> +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
> +        </relation>
> +
> +    </entity>
> +
> +    <!-- ========================================================= -->
> +    <!-- Star Schemas                                              -->
> +    <!-- ========================================================= -->
> +    <view-entity entity-name="SalesOrderItemStarSchema" package-name="org.ofbiz.bi.starschema.order" title="Sales Order Item Star Schema">
> +        <description>Order Item star schema (Profit and Loss Statement).</description>
> +
> +        <member-entity entity-alias="SIIF" entity-name="SalesOrderItemFact"/>
> +        <member-entity entity-alias="IDD" entity-name="DateDimension"/>
> +        <member-entity entity-alias="PD" entity-name="ProductDimension"/>
> +        <member-entity entity-alias="CD" entity-name="CurrencyDimension"/>
> +
> +        <alias-all entity-alias="IDD" prefix="orderDate" group-by="true">
> +            <exclude field="dimensionId"/>
> +        </alias-all>
> +        <alias-all entity-alias="PD" prefix="product" group-by="true">
> +            <exclude field="dimensionId"/>
> +        </alias-all>
> +        <alias-all entity-alias="CD" prefix="currency" group-by="true">
> +            <exclude field="dimensionId"/>
> +        </alias-all>
> +        <alias-all entity-alias="SIIF" function="sum">
> +            <exclude field="orderItemSeqId"/>
> +            <exclude field="orderDateDimId"/>
> +            <exclude field="productDimId"/>
> +            <exclude field="billToCustomerDimId"/>
> +            <exclude field="origCurrencyDimId"/>
> +            <exclude field="orderId"/>
> +            <exclude field="orderItemSeqId"/>
> +        </alias-all>
> +        <alias entity-alias="SIIF" name="orderId" group-by="true">
> +            <description>Order id</description>
> +        </alias>
> +        <alias entity-alias="SIIF" name="orderItemSeqId" group-by="true"/>
> +
> +        <view-link entity-alias="SIIF" rel-entity-alias="IDD">
> +            <key-map field-name="orderDateDimId" rel-field-name="dimensionId"/>
> +        </view-link>
> +        <view-link entity-alias="SIIF" rel-entity-alias="PD">
> +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
> +        </view-link>
> +        <view-link entity-alias="SIIF" rel-entity-alias="CD">
> +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
> +        </view-link>
> +
> +    </view-entity>
> +
> +</entitymodel>
> 
> Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> ------------------------------------------------------------------------------
>    svn:eol-style = native
> 
> Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> ------------------------------------------------------------------------------
>    svn:keywords = "Date Rev Author URL Id"
> 
> Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> ------------------------------------------------------------------------------
>    svn:mime-type = text/xml
> 
> Modified: ofbiz/trunk/applications/order/ofbiz-component.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/ofbiz-component.xml?rev=883034&r1=883033&r2=883034&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/order/ofbiz-component.xml (original)
> +++ ofbiz/trunk/applications/order/ofbiz-component.xml Sun Nov 22 04:37:27 2009
> @@ -28,6 +28,7 @@
>     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
>     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
>     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_view.xml"/>
> +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_olap.xml"/>
>     <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
>     <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderTypeData.xml"/>
>     <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderPortletData.xml"/>
> 
> 


Re: svn commit: r883034 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_olap.xml ofbiz-component.xml

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
If the entity-group is not specified, the default group "org.ofbiz" is used. The group is then mapped (in entityengine.xml) to a specific database.
Since all the entities of the OFBiz applications are in the same database (associated to ofbiz.org), then it is not needed to specify them.
But all the entities belonging to the "business intelligence" processes are mapped into a different database and in order to do this they have to be associated to the "org.ofbiz.olap" group.

Cheers,

Jacopo

On Nov 22, 2009, at 1:36 PM, Hans Bakker wrote:

> I have them here, but i was under the impressions entitygroup files were
> not needed anymore?
> 
> Regards,
> Hans
> 
> On Sun, 2009-11-22 at 12:49 +0100, Jacopo Cappellato wrote:
>> Hi Hans,
>> 
>> it is great to see some interest in this area of the project!
>> I had not time to review this (but I will do for sure) but one think that is missing here are the entries for the new entities in the entitygroup_olap.xml file:
>> 
>>    <entity-group group="org.ofbiz.olap" entity="SalesInvoiceItemFact"/>
>> etc...
>> 
>> I guess that you have just forgotten to commit that file.
>> 
>> Cheers,
>> 
>> Jacopo
>> 
>> 
>> On Nov 22, 2009, at 5:37 AM, hansbak@apache.org wrote:
>> 
>>> Author: hansbak
>>> Date: Sun Nov 22 04:37:27 2009
>>> New Revision: 883034
>>> 
>>> URL: http://svn.apache.org/viewvc?rev=883034&view=rev
>>> Log:
>>> A first proposal open for comments of the order OLAP entities. secas and initial load are on the way and implemeted following the same pattern as Jacopo's accounting entities
>>> 
>>> Added:
>>>   ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml   (with props)
>>> Modified:
>>>   ofbiz/trunk/applications/order/ofbiz-component.xml
>>> 
>>> Added: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml?rev=883034&view=auto
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml (added)
>>> +++ ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml Sun Nov 22 04:37:27 2009
>>> @@ -0,0 +1,203 @@
>>> +<?xml version="1.0" encoding="UTF-8"?>
>>> +<!--
>>> +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.
>>> +-->
>>> +
>>> +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
>>> +    <!-- ========================================================= -->
>>> +    <!-- ======================== Defaults ======================= -->
>>> +    <!-- ========================================================= -->
>>> +    <title>OLAP entities for the Order component</title>
>>> +    <description>None</description>
>>> +    <copyright>Copyright 2001-2007 The Apache Software Foundation</copyright>
>>> +
>>> +    <!-- ========================================================= -->
>>> +    <!-- Facts                                                     -->
>>> +    <!-- ========================================================= -->
>>> +    <entity entity-name="SalesOrderItemFact" package-name="org.ofbiz.bi.fact.order" title="Sales Order Item Fact">
>>> +        <description>A transaction fact entity with order item grain.</description>
>>> +        <field name="orderId" type="id-ne"></field> <!-- degenerate dimension -->
>>> +        <field name="orderItemSeqId" type="id-ne"></field> <!-- degenerate dimension -->
>>> +        <field name="orderDateDimId" type="id-ne"></field>
>>> +        <field name="productDimId" type="id-ne"></field>
>>> +        <field name="origCurrencyDimId" type="id-ne"></field>
>>> +        <field name="billToCustomerDimId" type="id-ne"></field> <!-- TODO: implement the dimension -->
>>> +
>>> +        <field name="quantity" type="fixed-point">
>>> +            <description>Quantity order. From OrderItem.quantity</description>
>>> +        </field>
>>> +        
>>> +        <field name="extGrossAmount" type="currency-precise">
>>> +            <description>Extended gross amount: quantity item multiplied by the unit price.</description>
>>> +        </field>
>>> +        <field name="extDiscountAmount" type="currency-precise">
>>> +            <description>Extended discount amount.</description>
>>> +        </field>
>>> +        <field name="extNetAmount" type="currency-precise">
>>> +            <description>Extended net amount: gross amount less discounts.</description>
>>> +        </field>
>>> +        <field name="extShippingAmount" type="currency-precise">
>>> +            <description>Extended shipping amount.</description>
>>> +        </field>
>>> +        <field name="extTaxAmount" type="currency-precise">
>>> +            <description>Extended tax amount.</description>
>>> +        </field>
>>> +        
>>> +        <field name="GrossSales" type="currency-precise">
>>> +            <description>Gross Sales</description>
>>> +        </field>
>>> +        <field name="GrossMerchandizeSales" type="currency-precise">
>>> +            <description>Gross Merchandize Sales</description>
>>> +        </field>
>>> +        <field name="GrossMerchandizeProfit" type="currency-precise">
>>> +            <description>Gross Merchandize Profit</description>
>>> +        </field>
>>> +        <field name="GrossShippingProfit" type="currency-precise">
>>> +            <description>Gross Shipping Profit</description>
>>> +        </field>
>>> +        <field name="GrossProfit" type="currency-precise">
>>> +            <description>Gross Profit</description>
>>> +        </field>
>>> +        <field name="AverageMerchandizeProfit" type="currency-precise">
>>> +            <description>Average Merchandize Profit</description>
>>> +        </field>
>>> +        <field name="AverageGrossProfit" type="currency-precise">
>>> +            <description>Average Gross Profit</description>
>>> +        </field>
>>> +
>>> +        <!--<field name="extGrossAmount" type="currency-precise">
>>> +            <description>Extended gross amount: quantity invoiced multiplied by the list unit price.</description>
>>> +        </field>
>>> +        <field name="extDiscountAmount" type="currency-precise">
>>> +            <description>Extended discount amount.</description>
>>> +        </field>
>>> +        <field name="extNetAmount" type="currency-precise">
>>> +            <description>Extended net amount: gross amount less discounts.</description>
>>> +        </field>
>>> +        <field name="extShippingAmount" type="currency-precise">
>>> +        <description>Extended shipping amount.</description>
>>> +        </field>
>>> +        <field name="extTaxAmount" type="currency-precise">
>>> +            <description>Extended tax amount.</description>
>>> +        </field>
>>> +        <field name="extManFixedCost" type="currency-precise">
>>> +            <description>Extended manufacturing fixed cost.</description>
>>> +        </field>
>>> +        <field name="extManVarCost" type="currency-precise">
>>> +            <description>Extended manufacturing variable cost.</description>
>>> +        </field>
>>> +        <field name="extStorageCost" type="currency-precise">
>>> +            <description>Extended storage cost.</description>
>>> +        </field>
>>> +        <field name="extDistributionCost" type="currency-precise">
>>> +            <description>Extended distribution cost.</description>
>>> +        </field>
>>> +        <field name="contributionAmount" type="currency-precise">
>>> +            <description>Extended net amount less all the costs.</description>
>>> +        </field>-->
>>> +        <!--
>>> +        TODO: implement multi-currency fields
>>> +        <field name="extGrossAmountOrig" type="currency-precise">
>>> +            <description>Extended gross amount in the original currency: quantity invoiced multiplied by the list unit price.</description>
>>> +        </field>
>>> +        <field name="extDiscountAmountOrig" type="currency-precise">
>>> +            <description>Extended discount amount in the original currency.</description>
>>> +        </field>
>>> +        <field name="extNetAmountOrig" type="currency-precise">
>>> +            <description>Extended net amount in the original currency: gross amount less discounts.</description>
>>> +        </field>
>>> +        <field name="extManFixedCostOrig" type="currency-precise">
>>> +            <description>Extended manufacturing fixed cost in the original currency.</description>
>>> +        </field>
>>> +        <field name="extManVarCostOrig" type="currency-precise">
>>> +            <description>Extended manufacturing variable cost in the original currency.</description>
>>> +        </field>
>>> +        <field name="extStorageCostOrig" type="currency-precise">
>>> +            <description>Extended storage cost in the original currency.</description>
>>> +        </field>
>>> +        <field name="extDistributionCostOrig" type="currency-precise">
>>> +            <description>Extended distribution cost in the original currency.</description>
>>> +        </field>
>>> +        <field name="contributionAmountOrig" type="currency-precise">
>>> +            <description>Extended net amount less all the costs in the original currency.</description>
>>> +        </field>
>>> +        -->
>>> +
>>> +        <prim-key field="orderId"/>
>>> +        <prim-key field="orderItemSeqId"/>
>>> +
>>> +        <relation type="one" fk-name="SIIF_INVDATE" rel-entity-name="DateDimension">
>>> +            <key-map field-name="invoiceDateDimId" rel-field-name="dimensionId"/>
>>> +        </relation>
>>> +        <relation type="one" fk-name="SIIF_CURRENCY" rel-entity-name="CurrencyDimension">
>>> +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
>>> +        </relation>
>>> +        <relation type="one" fk-name="SIIF_PRODUCT" rel-entity-name="ProductDimension">
>>> +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
>>> +        </relation>
>>> +
>>> +    </entity>
>>> +
>>> +    <!-- ========================================================= -->
>>> +    <!-- Star Schemas                                              -->
>>> +    <!-- ========================================================= -->
>>> +    <view-entity entity-name="SalesOrderItemStarSchema" package-name="org.ofbiz.bi.starschema.order" title="Sales Order Item Star Schema">
>>> +        <description>Order Item star schema (Profit and Loss Statement).</description>
>>> +
>>> +        <member-entity entity-alias="SIIF" entity-name="SalesOrderItemFact"/>
>>> +        <member-entity entity-alias="IDD" entity-name="DateDimension"/>
>>> +        <member-entity entity-alias="PD" entity-name="ProductDimension"/>
>>> +        <member-entity entity-alias="CD" entity-name="CurrencyDimension"/>
>>> +
>>> +        <alias-all entity-alias="IDD" prefix="orderDate" group-by="true">
>>> +            <exclude field="dimensionId"/>
>>> +        </alias-all>
>>> +        <alias-all entity-alias="PD" prefix="product" group-by="true">
>>> +            <exclude field="dimensionId"/>
>>> +        </alias-all>
>>> +        <alias-all entity-alias="CD" prefix="currency" group-by="true">
>>> +            <exclude field="dimensionId"/>
>>> +        </alias-all>
>>> +        <alias-all entity-alias="SIIF" function="sum">
>>> +            <exclude field="orderItemSeqId"/>
>>> +            <exclude field="orderDateDimId"/>
>>> +            <exclude field="productDimId"/>
>>> +            <exclude field="billToCustomerDimId"/>
>>> +            <exclude field="origCurrencyDimId"/>
>>> +            <exclude field="orderId"/>
>>> +            <exclude field="orderItemSeqId"/>
>>> +        </alias-all>
>>> +        <alias entity-alias="SIIF" name="orderId" group-by="true">
>>> +            <description>Order id</description>
>>> +        </alias>
>>> +        <alias entity-alias="SIIF" name="orderItemSeqId" group-by="true"/>
>>> +
>>> +        <view-link entity-alias="SIIF" rel-entity-alias="IDD">
>>> +            <key-map field-name="orderDateDimId" rel-field-name="dimensionId"/>
>>> +        </view-link>
>>> +        <view-link entity-alias="SIIF" rel-entity-alias="PD">
>>> +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
>>> +        </view-link>
>>> +        <view-link entity-alias="SIIF" rel-entity-alias="CD">
>>> +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
>>> +        </view-link>
>>> +
>>> +    </view-entity>
>>> +
>>> +</entitymodel>
>>> 
>>> Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>>> ------------------------------------------------------------------------------
>>>   svn:eol-style = native
>>> 
>>> Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>>> ------------------------------------------------------------------------------
>>>   svn:keywords = "Date Rev Author URL Id"
>>> 
>>> Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>>> ------------------------------------------------------------------------------
>>>   svn:mime-type = text/xml
>>> 
>>> Modified: ofbiz/trunk/applications/order/ofbiz-component.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/ofbiz-component.xml?rev=883034&r1=883033&r2=883034&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/applications/order/ofbiz-component.xml (original)
>>> +++ ofbiz/trunk/applications/order/ofbiz-component.xml Sun Nov 22 04:37:27 2009
>>> @@ -28,6 +28,7 @@
>>>    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
>>>    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
>>>    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_view.xml"/>
>>> +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_olap.xml"/>
>>>    <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
>>>    <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderTypeData.xml"/>
>>>    <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderPortletData.xml"/>
>>> 
>>> 
>> 
> -- 
> Antwebsystems.com: Quality OFBiz services for competitive rates
> 


Re: svn commit: r883034 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_olap.xml ofbiz-component.xml

Posted by Adrian Crum <ad...@yahoo.com>.
If an entity isn't explicitly added to a group, the entity engine assumes it is a part of the org.ofbiz group. So, if you want to add an entity to a different group, then you will need an entitygroup file.

-Adrian

--- On Sun, 11/22/09, Jacques Le Roux <ja...@les7arts.com> wrote:

> From: Jacques Le Roux <ja...@les7arts.com>
> Subject: Re: svn commit: r883034 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_olap.xml ofbiz-component.xml
> To: dev@ofbiz.apache.org
> Date: Sunday, November 22, 2009, 8:41 AM
> AFAIK, the only exception is BI (but
> I can't remember why, maybe because it uses its own
> group-map)
> 
> Jacques
> 
> From: "Hans Bakker" <ma...@antwebsystems.com>
> > I have them here, but i was under the impressions
> entitygroup files were
> > not needed anymore?
> > 
> > Regards,
> > Hans
> > 
> > On Sun, 2009-11-22 at 12:49 +0100, Jacopo Cappellato
> wrote:
> >> Hi Hans,
> >> 
> >> it is great to see some interest in this area of
> the project!
> >> I had not time to review this (but I will do for
> sure) but one think that is missing here are the entries for
> the new entities in the entitygroup_olap.xml file:
> >> 
> >>     <entity-group
> group="org.ofbiz.olap" entity="SalesInvoiceItemFact"/>
> >> etc...
> >> 
> >> I guess that you have just forgotten to commit
> that file.
> >> 
> >> Cheers,
> >> 
> >> Jacopo
> >> 
> >> 
> >> On Nov 22, 2009, at 5:37 AM, hansbak@apache.org
> wrote:
> >> 
> >> > Author: hansbak
> >> > Date: Sun Nov 22 04:37:27 2009
> >> > New Revision: 883034
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=883034&view=rev
> >> > Log:
> >> > A first proposal open for comments of the
> order OLAP entities. secas and initial load are on the way
> and implemeted following > the same pattern as Jacopo's
> accounting entities
> >> >
> >> > Added:
> >> >   
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml   (with
> props)
> >> > Modified:
> >> >   
> ofbiz/trunk/applications/order/ofbiz-component.xml
> >> >
> >> > Added:
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> >> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml?rev=883034&view=auto
> >> >
> ==============================================================================
> >> > ---
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> (added)
> >> > +++
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> Sun Nov 22 04:37:27 2009
> >> > @@ -0,0 +1,203 @@
> >> > +<?xml version="1.0"
> encoding="UTF-8"?>
> >> > +<!--
> >> > +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.
> >> > +-->
> >> > +
> >> > +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> > +   
> xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
> >> > +    <!--
> =========================================================
> -->
> >> > +    <!--
> ======================== Defaults =======================
> -->
> >> > +    <!--
> =========================================================
> -->
> >> > +    <title>OLAP entities for
> the Order component</title>
> >> > +   
> <description>None</description>
> >> > +    <copyright>Copyright
> 2001-2007 The Apache Software Foundation</copyright>
> >> > +
> >> > +    <!--
> =========================================================
> -->
> >> > +    <!-- Facts   
>                
>                
>              
>    -->
> >> > +    <!--
> =========================================================
> -->
> >> > +    <entity
> entity-name="SalesOrderItemFact"
> package-name="org.ofbiz.bi.fact.order" title="Sales Order
> Item Fact">
> >> > +       
> <description>A transaction fact entity with order item
> grain.</description>
> >> > +        <field
> name="orderId" type="id-ne"></field> <!--
> degenerate dimension -->
> >> > +        <field
> name="orderItemSeqId" type="id-ne"></field> <!--
> degenerate dimension -->
> >> > +        <field
> name="orderDateDimId" type="id-ne"></field>
> >> > +        <field
> name="productDimId" type="id-ne"></field>
> >> > +        <field
> name="origCurrencyDimId" type="id-ne"></field>
> >> > +        <field
> name="billToCustomerDimId" type="id-ne"></field>
> <!-- TODO: implement the dimension -->
> >> > +
> >> > +        <field
> name="quantity" type="fixed-point">
> >> > +           
> <description>Quantity order. From
> OrderItem.quantity</description>
> >> > +        </field>
> >> > +
> >> > +        <field
> name="extGrossAmount" type="currency-precise">
> >> > +           
> <description>Extended gross amount: quantity item
> multiplied by the unit price.</description>
> >> > +        </field>
> >> > +        <field
> name="extDiscountAmount" type="currency-precise">
> >> > +           
> <description>Extended discount
> amount.</description>
> >> > +        </field>
> >> > +        <field
> name="extNetAmount" type="currency-precise">
> >> > +           
> <description>Extended net amount: gross amount less
> discounts.</description>
> >> > +        </field>
> >> > +        <field
> name="extShippingAmount" type="currency-precise">
> >> > +           
> <description>Extended shipping
> amount.</description>
> >> > +        </field>
> >> > +        <field
> name="extTaxAmount" type="currency-precise">
> >> > +           
> <description>Extended tax amount.</description>
> >> > +        </field>
> >> > +
> >> > +        <field
> name="GrossSales" type="currency-precise">
> >> > +           
> <description>Gross Sales</description>
> >> > +        </field>
> >> > +        <field
> name="GrossMerchandizeSales" type="currency-precise">
> >> > +           
> <description>Gross Merchandize
> Sales</description>
> >> > +        </field>
> >> > +        <field
> name="GrossMerchandizeProfit" type="currency-precise">
> >> > +           
> <description>Gross Merchandize
> Profit</description>
> >> > +        </field>
> >> > +        <field
> name="GrossShippingProfit" type="currency-precise">
> >> > +           
> <description>Gross Shipping
> Profit</description>
> >> > +        </field>
> >> > +        <field
> name="GrossProfit" type="currency-precise">
> >> > +           
> <description>Gross Profit</description>
> >> > +        </field>
> >> > +        <field
> name="AverageMerchandizeProfit" type="currency-precise">
> >> > +           
> <description>Average Merchandize
> Profit</description>
> >> > +        </field>
> >> > +        <field
> name="AverageGrossProfit" type="currency-precise">
> >> > +           
> <description>Average Gross Profit</description>
> >> > +        </field>
> >> > +
> >> > +        <!--<field
> name="extGrossAmount" type="currency-precise">
> >> > +           
> <description>Extended gross amount: quantity invoiced
> multiplied by the list unit price.</description>
> >> > +        </field>
> >> > +        <field
> name="extDiscountAmount" type="currency-precise">
> >> > +           
> <description>Extended discount
> amount.</description>
> >> > +        </field>
> >> > +        <field
> name="extNetAmount" type="currency-precise">
> >> > +           
> <description>Extended net amount: gross amount less
> discounts.</description>
> >> > +        </field>
> >> > +        <field
> name="extShippingAmount" type="currency-precise">
> >> > +       
> <description>Extended shipping
> amount.</description>
> >> > +        </field>
> >> > +        <field
> name="extTaxAmount" type="currency-precise">
> >> > +           
> <description>Extended tax amount.</description>
> >> > +        </field>
> >> > +        <field
> name="extManFixedCost" type="currency-precise">
> >> > +           
> <description>Extended manufacturing fixed
> cost.</description>
> >> > +        </field>
> >> > +        <field
> name="extManVarCost" type="currency-precise">
> >> > +           
> <description>Extended manufacturing variable
> cost.</description>
> >> > +        </field>
> >> > +        <field
> name="extStorageCost" type="currency-precise">
> >> > +           
> <description>Extended storage
> cost.</description>
> >> > +        </field>
> >> > +        <field
> name="extDistributionCost" type="currency-precise">
> >> > +           
> <description>Extended distribution
> cost.</description>
> >> > +        </field>
> >> > +        <field
> name="contributionAmount" type="currency-precise">
> >> > +           
> <description>Extended net amount less all the
> costs.</description>
> >> > +       
> </field>-->
> >> > +        <!--
> >> > +        TODO: implement
> multi-currency fields
> >> > +        <field
> name="extGrossAmountOrig" type="currency-precise">
> >> > +           
> <description>Extended gross amount in the original
> currency: quantity invoiced multiplied by the list unit >
> price.</description>
> >> > +        </field>
> >> > +        <field
> name="extDiscountAmountOrig" type="currency-precise">
> >> > +           
> <description>Extended discount amount in the original
> currency.</description>
> >> > +        </field>
> >> > +        <field
> name="extNetAmountOrig" type="currency-precise">
> >> > +           
> <description>Extended net amount in the original
> currency: gross amount less discounts.</description>
> >> > +        </field>
> >> > +        <field
> name="extManFixedCostOrig" type="currency-precise">
> >> > +           
> <description>Extended manufacturing fixed cost in the
> original currency.</description>
> >> > +        </field>
> >> > +        <field
> name="extManVarCostOrig" type="currency-precise">
> >> > +           
> <description>Extended manufacturing variable cost in
> the original currency.</description>
> >> > +        </field>
> >> > +        <field
> name="extStorageCostOrig" type="currency-precise">
> >> > +           
> <description>Extended storage cost in the original
> currency.</description>
> >> > +        </field>
> >> > +        <field
> name="extDistributionCostOrig" type="currency-precise">
> >> > +           
> <description>Extended distribution cost in the
> original currency.</description>
> >> > +        </field>
> >> > +        <field
> name="contributionAmountOrig" type="currency-precise">
> >> > +           
> <description>Extended net amount less all the costs in
> the original currency.</description>
> >> > +        </field>
> >> > +        -->
> >> > +
> >> > +        <prim-key
> field="orderId"/>
> >> > +        <prim-key
> field="orderItemSeqId"/>
> >> > +
> >> > +        <relation
> type="one" fk-name="SIIF_INVDATE"
> rel-entity-name="DateDimension">
> >> > +           
> <key-map field-name="invoiceDateDimId"
> rel-field-name="dimensionId"/>
> >> > +       
> </relation>
> >> > +        <relation
> type="one" fk-name="SIIF_CURRENCY"
> rel-entity-name="CurrencyDimension">
> >> > +           
> <key-map field-name="origCurrencyDimId"
> rel-field-name="dimensionId"/>
> >> > +       
> </relation>
> >> > +        <relation
> type="one" fk-name="SIIF_PRODUCT"
> rel-entity-name="ProductDimension">
> >> > +           
> <key-map field-name="productDimId"
> rel-field-name="dimensionId"/>
> >> > +       
> </relation>
> >> > +
> >> > +    </entity>
> >> > +
> >> > +    <!--
> =========================================================
> -->
> >> > +    <!-- Star Schemas 
>                
>                
>             -->
> >> > +    <!--
> =========================================================
> -->
> >> > +    <view-entity
> entity-name="SalesOrderItemStarSchema"
> package-name="org.ofbiz.bi.starschema.order" title="Sales
> Order Item > Star Schema">
> >> > +       
> <description>Order Item star schema (Profit and Loss
> Statement).</description>
> >> > +
> >> > +       
> <member-entity entity-alias="SIIF"
> entity-name="SalesOrderItemFact"/>
> >> > +       
> <member-entity entity-alias="IDD"
> entity-name="DateDimension"/>
> >> > +       
> <member-entity entity-alias="PD"
> entity-name="ProductDimension"/>
> >> > +       
> <member-entity entity-alias="CD"
> entity-name="CurrencyDimension"/>
> >> > +
> >> > +        <alias-all
> entity-alias="IDD" prefix="orderDate" group-by="true">
> >> > +           
> <exclude field="dimensionId"/>
> >> > +       
> </alias-all>
> >> > +        <alias-all
> entity-alias="PD" prefix="product" group-by="true">
> >> > +           
> <exclude field="dimensionId"/>
> >> > +       
> </alias-all>
> >> > +        <alias-all
> entity-alias="CD" prefix="currency" group-by="true">
> >> > +           
> <exclude field="dimensionId"/>
> >> > +       
> </alias-all>
> >> > +        <alias-all
> entity-alias="SIIF" function="sum">
> >> > +           
> <exclude field="orderItemSeqId"/>
> >> > +           
> <exclude field="orderDateDimId"/>
> >> > +           
> <exclude field="productDimId"/>
> >> > +           
> <exclude field="billToCustomerDimId"/>
> >> > +           
> <exclude field="origCurrencyDimId"/>
> >> > +           
> <exclude field="orderId"/>
> >> > +           
> <exclude field="orderItemSeqId"/>
> >> > +       
> </alias-all>
> >> > +        <alias
> entity-alias="SIIF" name="orderId" group-by="true">
> >> > +           
> <description>Order id</description>
> >> > +        </alias>
> >> > +        <alias
> entity-alias="SIIF" name="orderItemSeqId"
> group-by="true"/>
> >> > +
> >> > +        <view-link
> entity-alias="SIIF" rel-entity-alias="IDD">
> >> > +           
> <key-map field-name="orderDateDimId"
> rel-field-name="dimensionId"/>
> >> > +       
> </view-link>
> >> > +        <view-link
> entity-alias="SIIF" rel-entity-alias="PD">
> >> > +           
> <key-map field-name="productDimId"
> rel-field-name="dimensionId"/>
> >> > +       
> </view-link>
> >> > +        <view-link
> entity-alias="SIIF" rel-entity-alias="CD">
> >> > +           
> <key-map field-name="origCurrencyDimId"
> rel-field-name="dimensionId"/>
> >> > +       
> </view-link>
> >> > +
> >> > +    </view-entity>
> >> > +
> >> > +</entitymodel>
> >> >
> >> > Propchange:
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> >> >
> ------------------------------------------------------------------------------
> >> >    svn:eol-style = native
> >> >
> >> > Propchange:
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> >> >
> ------------------------------------------------------------------------------
> >> >    svn:keywords = "Date Rev Author
> URL Id"
> >> >
> >> > Propchange:
> ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> >> >
> ------------------------------------------------------------------------------
> >> >    svn:mime-type = text/xml
> >> >
> >> > Modified:
> ofbiz/trunk/applications/order/ofbiz-component.xml
> >> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/ofbiz-component.xml?rev=883034&r1=883033&r2=883034&view=diff
> >> >
> ==============================================================================
> >> > ---
> ofbiz/trunk/applications/order/ofbiz-component.xml
> (original)
> >> > +++
> ofbiz/trunk/applications/order/ofbiz-component.xml Sun Nov
> 22 04:37:27 2009
> >> > @@ -28,6 +28,7 @@
> >> >     <entity-resource
> type="model" reader-name="main" loader="main"
> location="entitydef/entitymodel.xml"/>
> >> >     <entity-resource
> type="model" reader-name="main" loader="main"
> location="entitydef/entitymodel_old.xml"/>
> >> >     <entity-resource
> type="model" reader-name="main" loader="main"
> location="entitydef/entitymodel_view.xml"/>
> >> > +    <entity-resource
> type="model" reader-name="main" loader="main"
> location="entitydef/entitymodel_olap.xml"/>
> >> >     <entity-resource
> type="eca" reader-name="main" loader="main"
> location="entitydef/eecas.xml"/>
> >> >     <entity-resource
> type="data" reader-name="seed" loader="main"
> location="data/OrderTypeData.xml"/>
> >> >     <entity-resource
> type="data" reader-name="seed" loader="main"
> location="data/OrderPortletData.xml"/>
> >> >
> >> >
> >> 
> > -- Antwebsystems.com: Quality OFBiz services for
> competitive rates
> > 
> 
> 
> 


      

Re: svn commit: r883034 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_olap.xml ofbiz-component.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
AFAIK, the only exception is BI (but I can't remember why, maybe because it uses its own group-map)

Jacques

From: "Hans Bakker" <ma...@antwebsystems.com>
>I have them here, but i was under the impressions entitygroup files were
> not needed anymore?
>
> Regards,
> Hans
>
> On Sun, 2009-11-22 at 12:49 +0100, Jacopo Cappellato wrote:
>> Hi Hans,
>>
>> it is great to see some interest in this area of the project!
>> I had not time to review this (but I will do for sure) but one think that is missing here are the entries for the new entities in 
>> the entitygroup_olap.xml file:
>>
>>     <entity-group group="org.ofbiz.olap" entity="SalesInvoiceItemFact"/>
>> etc...
>>
>> I guess that you have just forgotten to commit that file.
>>
>> Cheers,
>>
>> Jacopo
>>
>>
>> On Nov 22, 2009, at 5:37 AM, hansbak@apache.org wrote:
>>
>> > Author: hansbak
>> > Date: Sun Nov 22 04:37:27 2009
>> > New Revision: 883034
>> >
>> > URL: http://svn.apache.org/viewvc?rev=883034&view=rev
>> > Log:
>> > A first proposal open for comments of the order OLAP entities. secas and initial load are on the way and implemeted following 
>> > the same pattern as Jacopo's accounting entities
>> >
>> > Added:
>> >    ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml   (with props)
>> > Modified:
>> >    ofbiz/trunk/applications/order/ofbiz-component.xml
>> >
>> > Added: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml?rev=883034&view=auto
>> > ==============================================================================
>> > --- ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml (added)
>> > +++ ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml Sun Nov 22 04:37:27 2009
>> > @@ -0,0 +1,203 @@
>> > +<?xml version="1.0" encoding="UTF-8"?>
>> > +<!--
>> > +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.
>> > +-->
>> > +
>> > +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
>> > +    <!-- ========================================================= -->
>> > +    <!-- ======================== Defaults ======================= -->
>> > +    <!-- ========================================================= -->
>> > +    <title>OLAP entities for the Order component</title>
>> > +    <description>None</description>
>> > +    <copyright>Copyright 2001-2007 The Apache Software Foundation</copyright>
>> > +
>> > +    <!-- ========================================================= -->
>> > +    <!-- Facts                                                     -->
>> > +    <!-- ========================================================= -->
>> > +    <entity entity-name="SalesOrderItemFact" package-name="org.ofbiz.bi.fact.order" title="Sales Order Item Fact">
>> > +        <description>A transaction fact entity with order item grain.</description>
>> > +        <field name="orderId" type="id-ne"></field> <!-- degenerate dimension -->
>> > +        <field name="orderItemSeqId" type="id-ne"></field> <!-- degenerate dimension -->
>> > +        <field name="orderDateDimId" type="id-ne"></field>
>> > +        <field name="productDimId" type="id-ne"></field>
>> > +        <field name="origCurrencyDimId" type="id-ne"></field>
>> > +        <field name="billToCustomerDimId" type="id-ne"></field> <!-- TODO: implement the dimension -->
>> > +
>> > +        <field name="quantity" type="fixed-point">
>> > +            <description>Quantity order. From OrderItem.quantity</description>
>> > +        </field>
>> > +
>> > +        <field name="extGrossAmount" type="currency-precise">
>> > +            <description>Extended gross amount: quantity item multiplied by the unit price.</description>
>> > +        </field>
>> > +        <field name="extDiscountAmount" type="currency-precise">
>> > +            <description>Extended discount amount.</description>
>> > +        </field>
>> > +        <field name="extNetAmount" type="currency-precise">
>> > +            <description>Extended net amount: gross amount less discounts.</description>
>> > +        </field>
>> > +        <field name="extShippingAmount" type="currency-precise">
>> > +            <description>Extended shipping amount.</description>
>> > +        </field>
>> > +        <field name="extTaxAmount" type="currency-precise">
>> > +            <description>Extended tax amount.</description>
>> > +        </field>
>> > +
>> > +        <field name="GrossSales" type="currency-precise">
>> > +            <description>Gross Sales</description>
>> > +        </field>
>> > +        <field name="GrossMerchandizeSales" type="currency-precise">
>> > +            <description>Gross Merchandize Sales</description>
>> > +        </field>
>> > +        <field name="GrossMerchandizeProfit" type="currency-precise">
>> > +            <description>Gross Merchandize Profit</description>
>> > +        </field>
>> > +        <field name="GrossShippingProfit" type="currency-precise">
>> > +            <description>Gross Shipping Profit</description>
>> > +        </field>
>> > +        <field name="GrossProfit" type="currency-precise">
>> > +            <description>Gross Profit</description>
>> > +        </field>
>> > +        <field name="AverageMerchandizeProfit" type="currency-precise">
>> > +            <description>Average Merchandize Profit</description>
>> > +        </field>
>> > +        <field name="AverageGrossProfit" type="currency-precise">
>> > +            <description>Average Gross Profit</description>
>> > +        </field>
>> > +
>> > +        <!--<field name="extGrossAmount" type="currency-precise">
>> > +            <description>Extended gross amount: quantity invoiced multiplied by the list unit price.</description>
>> > +        </field>
>> > +        <field name="extDiscountAmount" type="currency-precise">
>> > +            <description>Extended discount amount.</description>
>> > +        </field>
>> > +        <field name="extNetAmount" type="currency-precise">
>> > +            <description>Extended net amount: gross amount less discounts.</description>
>> > +        </field>
>> > +        <field name="extShippingAmount" type="currency-precise">
>> > +        <description>Extended shipping amount.</description>
>> > +        </field>
>> > +        <field name="extTaxAmount" type="currency-precise">
>> > +            <description>Extended tax amount.</description>
>> > +        </field>
>> > +        <field name="extManFixedCost" type="currency-precise">
>> > +            <description>Extended manufacturing fixed cost.</description>
>> > +        </field>
>> > +        <field name="extManVarCost" type="currency-precise">
>> > +            <description>Extended manufacturing variable cost.</description>
>> > +        </field>
>> > +        <field name="extStorageCost" type="currency-precise">
>> > +            <description>Extended storage cost.</description>
>> > +        </field>
>> > +        <field name="extDistributionCost" type="currency-precise">
>> > +            <description>Extended distribution cost.</description>
>> > +        </field>
>> > +        <field name="contributionAmount" type="currency-precise">
>> > +            <description>Extended net amount less all the costs.</description>
>> > +        </field>-->
>> > +        <!--
>> > +        TODO: implement multi-currency fields
>> > +        <field name="extGrossAmountOrig" type="currency-precise">
>> > +            <description>Extended gross amount in the original currency: quantity invoiced multiplied by the list unit 
>> > price.</description>
>> > +        </field>
>> > +        <field name="extDiscountAmountOrig" type="currency-precise">
>> > +            <description>Extended discount amount in the original currency.</description>
>> > +        </field>
>> > +        <field name="extNetAmountOrig" type="currency-precise">
>> > +            <description>Extended net amount in the original currency: gross amount less discounts.</description>
>> > +        </field>
>> > +        <field name="extManFixedCostOrig" type="currency-precise">
>> > +            <description>Extended manufacturing fixed cost in the original currency.</description>
>> > +        </field>
>> > +        <field name="extManVarCostOrig" type="currency-precise">
>> > +            <description>Extended manufacturing variable cost in the original currency.</description>
>> > +        </field>
>> > +        <field name="extStorageCostOrig" type="currency-precise">
>> > +            <description>Extended storage cost in the original currency.</description>
>> > +        </field>
>> > +        <field name="extDistributionCostOrig" type="currency-precise">
>> > +            <description>Extended distribution cost in the original currency.</description>
>> > +        </field>
>> > +        <field name="contributionAmountOrig" type="currency-precise">
>> > +            <description>Extended net amount less all the costs in the original currency.</description>
>> > +        </field>
>> > +        -->
>> > +
>> > +        <prim-key field="orderId"/>
>> > +        <prim-key field="orderItemSeqId"/>
>> > +
>> > +        <relation type="one" fk-name="SIIF_INVDATE" rel-entity-name="DateDimension">
>> > +            <key-map field-name="invoiceDateDimId" rel-field-name="dimensionId"/>
>> > +        </relation>
>> > +        <relation type="one" fk-name="SIIF_CURRENCY" rel-entity-name="CurrencyDimension">
>> > +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
>> > +        </relation>
>> > +        <relation type="one" fk-name="SIIF_PRODUCT" rel-entity-name="ProductDimension">
>> > +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
>> > +        </relation>
>> > +
>> > +    </entity>
>> > +
>> > +    <!-- ========================================================= -->
>> > +    <!-- Star Schemas                                              -->
>> > +    <!-- ========================================================= -->
>> > +    <view-entity entity-name="SalesOrderItemStarSchema" package-name="org.ofbiz.bi.starschema.order" title="Sales Order Item 
>> > Star Schema">
>> > +        <description>Order Item star schema (Profit and Loss Statement).</description>
>> > +
>> > +        <member-entity entity-alias="SIIF" entity-name="SalesOrderItemFact"/>
>> > +        <member-entity entity-alias="IDD" entity-name="DateDimension"/>
>> > +        <member-entity entity-alias="PD" entity-name="ProductDimension"/>
>> > +        <member-entity entity-alias="CD" entity-name="CurrencyDimension"/>
>> > +
>> > +        <alias-all entity-alias="IDD" prefix="orderDate" group-by="true">
>> > +            <exclude field="dimensionId"/>
>> > +        </alias-all>
>> > +        <alias-all entity-alias="PD" prefix="product" group-by="true">
>> > +            <exclude field="dimensionId"/>
>> > +        </alias-all>
>> > +        <alias-all entity-alias="CD" prefix="currency" group-by="true">
>> > +            <exclude field="dimensionId"/>
>> > +        </alias-all>
>> > +        <alias-all entity-alias="SIIF" function="sum">
>> > +            <exclude field="orderItemSeqId"/>
>> > +            <exclude field="orderDateDimId"/>
>> > +            <exclude field="productDimId"/>
>> > +            <exclude field="billToCustomerDimId"/>
>> > +            <exclude field="origCurrencyDimId"/>
>> > +            <exclude field="orderId"/>
>> > +            <exclude field="orderItemSeqId"/>
>> > +        </alias-all>
>> > +        <alias entity-alias="SIIF" name="orderId" group-by="true">
>> > +            <description>Order id</description>
>> > +        </alias>
>> > +        <alias entity-alias="SIIF" name="orderItemSeqId" group-by="true"/>
>> > +
>> > +        <view-link entity-alias="SIIF" rel-entity-alias="IDD">
>> > +            <key-map field-name="orderDateDimId" rel-field-name="dimensionId"/>
>> > +        </view-link>
>> > +        <view-link entity-alias="SIIF" rel-entity-alias="PD">
>> > +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
>> > +        </view-link>
>> > +        <view-link entity-alias="SIIF" rel-entity-alias="CD">
>> > +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
>> > +        </view-link>
>> > +
>> > +    </view-entity>
>> > +
>> > +</entitymodel>
>> >
>> > Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>> > ------------------------------------------------------------------------------
>> >    svn:eol-style = native
>> >
>> > Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>> > ------------------------------------------------------------------------------
>> >    svn:keywords = "Date Rev Author URL Id"
>> >
>> > Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
>> > ------------------------------------------------------------------------------
>> >    svn:mime-type = text/xml
>> >
>> > Modified: ofbiz/trunk/applications/order/ofbiz-component.xml
>> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/ofbiz-component.xml?rev=883034&r1=883033&r2=883034&view=diff
>> > ==============================================================================
>> > --- ofbiz/trunk/applications/order/ofbiz-component.xml (original)
>> > +++ ofbiz/trunk/applications/order/ofbiz-component.xml Sun Nov 22 04:37:27 2009
>> > @@ -28,6 +28,7 @@
>> >     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
>> >     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
>> >     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_view.xml"/>
>> > +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_olap.xml"/>
>> >     <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
>> >     <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderTypeData.xml"/>
>> >     <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderPortletData.xml"/>
>> >
>> >
>>
> -- 
> Antwebsystems.com: Quality OFBiz services for competitive rates
> 



Re: svn commit: r883034 - in /ofbiz/trunk/applications/order: entitydef/entitymodel_olap.xml ofbiz-component.xml

Posted by Hans Bakker <ma...@antwebsystems.com>.
I have them here, but i was under the impressions entitygroup files were
not needed anymore?

Regards,
Hans

On Sun, 2009-11-22 at 12:49 +0100, Jacopo Cappellato wrote:
> Hi Hans,
> 
> it is great to see some interest in this area of the project!
> I had not time to review this (but I will do for sure) but one think that is missing here are the entries for the new entities in the entitygroup_olap.xml file:
> 
>     <entity-group group="org.ofbiz.olap" entity="SalesInvoiceItemFact"/>
> etc...
> 
> I guess that you have just forgotten to commit that file.
> 
> Cheers,
> 
> Jacopo
> 
> 
> On Nov 22, 2009, at 5:37 AM, hansbak@apache.org wrote:
> 
> > Author: hansbak
> > Date: Sun Nov 22 04:37:27 2009
> > New Revision: 883034
> > 
> > URL: http://svn.apache.org/viewvc?rev=883034&view=rev
> > Log:
> > A first proposal open for comments of the order OLAP entities. secas and initial load are on the way and implemeted following the same pattern as Jacopo's accounting entities
> > 
> > Added:
> >    ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml   (with props)
> > Modified:
> >    ofbiz/trunk/applications/order/ofbiz-component.xml
> > 
> > Added: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml?rev=883034&view=auto
> > ==============================================================================
> > --- ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml (added)
> > +++ ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml Sun Nov 22 04:37:27 2009
> > @@ -0,0 +1,203 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<!--
> > +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.
> > +-->
> > +
> > +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > +    xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
> > +    <!-- ========================================================= -->
> > +    <!-- ======================== Defaults ======================= -->
> > +    <!-- ========================================================= -->
> > +    <title>OLAP entities for the Order component</title>
> > +    <description>None</description>
> > +    <copyright>Copyright 2001-2007 The Apache Software Foundation</copyright>
> > +
> > +    <!-- ========================================================= -->
> > +    <!-- Facts                                                     -->
> > +    <!-- ========================================================= -->
> > +    <entity entity-name="SalesOrderItemFact" package-name="org.ofbiz.bi.fact.order" title="Sales Order Item Fact">
> > +        <description>A transaction fact entity with order item grain.</description>
> > +        <field name="orderId" type="id-ne"></field> <!-- degenerate dimension -->
> > +        <field name="orderItemSeqId" type="id-ne"></field> <!-- degenerate dimension -->
> > +        <field name="orderDateDimId" type="id-ne"></field>
> > +        <field name="productDimId" type="id-ne"></field>
> > +        <field name="origCurrencyDimId" type="id-ne"></field>
> > +        <field name="billToCustomerDimId" type="id-ne"></field> <!-- TODO: implement the dimension -->
> > +
> > +        <field name="quantity" type="fixed-point">
> > +            <description>Quantity order. From OrderItem.quantity</description>
> > +        </field>
> > +        
> > +        <field name="extGrossAmount" type="currency-precise">
> > +            <description>Extended gross amount: quantity item multiplied by the unit price.</description>
> > +        </field>
> > +        <field name="extDiscountAmount" type="currency-precise">
> > +            <description>Extended discount amount.</description>
> > +        </field>
> > +        <field name="extNetAmount" type="currency-precise">
> > +            <description>Extended net amount: gross amount less discounts.</description>
> > +        </field>
> > +        <field name="extShippingAmount" type="currency-precise">
> > +            <description>Extended shipping amount.</description>
> > +        </field>
> > +        <field name="extTaxAmount" type="currency-precise">
> > +            <description>Extended tax amount.</description>
> > +        </field>
> > +        
> > +        <field name="GrossSales" type="currency-precise">
> > +            <description>Gross Sales</description>
> > +        </field>
> > +        <field name="GrossMerchandizeSales" type="currency-precise">
> > +            <description>Gross Merchandize Sales</description>
> > +        </field>
> > +        <field name="GrossMerchandizeProfit" type="currency-precise">
> > +            <description>Gross Merchandize Profit</description>
> > +        </field>
> > +        <field name="GrossShippingProfit" type="currency-precise">
> > +            <description>Gross Shipping Profit</description>
> > +        </field>
> > +        <field name="GrossProfit" type="currency-precise">
> > +            <description>Gross Profit</description>
> > +        </field>
> > +        <field name="AverageMerchandizeProfit" type="currency-precise">
> > +            <description>Average Merchandize Profit</description>
> > +        </field>
> > +        <field name="AverageGrossProfit" type="currency-precise">
> > +            <description>Average Gross Profit</description>
> > +        </field>
> > +
> > +        <!--<field name="extGrossAmount" type="currency-precise">
> > +            <description>Extended gross amount: quantity invoiced multiplied by the list unit price.</description>
> > +        </field>
> > +        <field name="extDiscountAmount" type="currency-precise">
> > +            <description>Extended discount amount.</description>
> > +        </field>
> > +        <field name="extNetAmount" type="currency-precise">
> > +            <description>Extended net amount: gross amount less discounts.</description>
> > +        </field>
> > +        <field name="extShippingAmount" type="currency-precise">
> > +        <description>Extended shipping amount.</description>
> > +        </field>
> > +        <field name="extTaxAmount" type="currency-precise">
> > +            <description>Extended tax amount.</description>
> > +        </field>
> > +        <field name="extManFixedCost" type="currency-precise">
> > +            <description>Extended manufacturing fixed cost.</description>
> > +        </field>
> > +        <field name="extManVarCost" type="currency-precise">
> > +            <description>Extended manufacturing variable cost.</description>
> > +        </field>
> > +        <field name="extStorageCost" type="currency-precise">
> > +            <description>Extended storage cost.</description>
> > +        </field>
> > +        <field name="extDistributionCost" type="currency-precise">
> > +            <description>Extended distribution cost.</description>
> > +        </field>
> > +        <field name="contributionAmount" type="currency-precise">
> > +            <description>Extended net amount less all the costs.</description>
> > +        </field>-->
> > +        <!--
> > +        TODO: implement multi-currency fields
> > +        <field name="extGrossAmountOrig" type="currency-precise">
> > +            <description>Extended gross amount in the original currency: quantity invoiced multiplied by the list unit price.</description>
> > +        </field>
> > +        <field name="extDiscountAmountOrig" type="currency-precise">
> > +            <description>Extended discount amount in the original currency.</description>
> > +        </field>
> > +        <field name="extNetAmountOrig" type="currency-precise">
> > +            <description>Extended net amount in the original currency: gross amount less discounts.</description>
> > +        </field>
> > +        <field name="extManFixedCostOrig" type="currency-precise">
> > +            <description>Extended manufacturing fixed cost in the original currency.</description>
> > +        </field>
> > +        <field name="extManVarCostOrig" type="currency-precise">
> > +            <description>Extended manufacturing variable cost in the original currency.</description>
> > +        </field>
> > +        <field name="extStorageCostOrig" type="currency-precise">
> > +            <description>Extended storage cost in the original currency.</description>
> > +        </field>
> > +        <field name="extDistributionCostOrig" type="currency-precise">
> > +            <description>Extended distribution cost in the original currency.</description>
> > +        </field>
> > +        <field name="contributionAmountOrig" type="currency-precise">
> > +            <description>Extended net amount less all the costs in the original currency.</description>
> > +        </field>
> > +        -->
> > +
> > +        <prim-key field="orderId"/>
> > +        <prim-key field="orderItemSeqId"/>
> > +
> > +        <relation type="one" fk-name="SIIF_INVDATE" rel-entity-name="DateDimension">
> > +            <key-map field-name="invoiceDateDimId" rel-field-name="dimensionId"/>
> > +        </relation>
> > +        <relation type="one" fk-name="SIIF_CURRENCY" rel-entity-name="CurrencyDimension">
> > +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
> > +        </relation>
> > +        <relation type="one" fk-name="SIIF_PRODUCT" rel-entity-name="ProductDimension">
> > +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
> > +        </relation>
> > +
> > +    </entity>
> > +
> > +    <!-- ========================================================= -->
> > +    <!-- Star Schemas                                              -->
> > +    <!-- ========================================================= -->
> > +    <view-entity entity-name="SalesOrderItemStarSchema" package-name="org.ofbiz.bi.starschema.order" title="Sales Order Item Star Schema">
> > +        <description>Order Item star schema (Profit and Loss Statement).</description>
> > +
> > +        <member-entity entity-alias="SIIF" entity-name="SalesOrderItemFact"/>
> > +        <member-entity entity-alias="IDD" entity-name="DateDimension"/>
> > +        <member-entity entity-alias="PD" entity-name="ProductDimension"/>
> > +        <member-entity entity-alias="CD" entity-name="CurrencyDimension"/>
> > +
> > +        <alias-all entity-alias="IDD" prefix="orderDate" group-by="true">
> > +            <exclude field="dimensionId"/>
> > +        </alias-all>
> > +        <alias-all entity-alias="PD" prefix="product" group-by="true">
> > +            <exclude field="dimensionId"/>
> > +        </alias-all>
> > +        <alias-all entity-alias="CD" prefix="currency" group-by="true">
> > +            <exclude field="dimensionId"/>
> > +        </alias-all>
> > +        <alias-all entity-alias="SIIF" function="sum">
> > +            <exclude field="orderItemSeqId"/>
> > +            <exclude field="orderDateDimId"/>
> > +            <exclude field="productDimId"/>
> > +            <exclude field="billToCustomerDimId"/>
> > +            <exclude field="origCurrencyDimId"/>
> > +            <exclude field="orderId"/>
> > +            <exclude field="orderItemSeqId"/>
> > +        </alias-all>
> > +        <alias entity-alias="SIIF" name="orderId" group-by="true">
> > +            <description>Order id</description>
> > +        </alias>
> > +        <alias entity-alias="SIIF" name="orderItemSeqId" group-by="true"/>
> > +
> > +        <view-link entity-alias="SIIF" rel-entity-alias="IDD">
> > +            <key-map field-name="orderDateDimId" rel-field-name="dimensionId"/>
> > +        </view-link>
> > +        <view-link entity-alias="SIIF" rel-entity-alias="PD">
> > +            <key-map field-name="productDimId" rel-field-name="dimensionId"/>
> > +        </view-link>
> > +        <view-link entity-alias="SIIF" rel-entity-alias="CD">
> > +            <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/>
> > +        </view-link>
> > +
> > +    </view-entity>
> > +
> > +</entitymodel>
> > 
> > Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> > ------------------------------------------------------------------------------
> >    svn:eol-style = native
> > 
> > Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> > ------------------------------------------------------------------------------
> >    svn:keywords = "Date Rev Author URL Id"
> > 
> > Propchange: ofbiz/trunk/applications/order/entitydef/entitymodel_olap.xml
> > ------------------------------------------------------------------------------
> >    svn:mime-type = text/xml
> > 
> > Modified: ofbiz/trunk/applications/order/ofbiz-component.xml
> > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/ofbiz-component.xml?rev=883034&r1=883033&r2=883034&view=diff
> > ==============================================================================
> > --- ofbiz/trunk/applications/order/ofbiz-component.xml (original)
> > +++ ofbiz/trunk/applications/order/ofbiz-component.xml Sun Nov 22 04:37:27 2009
> > @@ -28,6 +28,7 @@
> >     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
> >     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_old.xml"/>
> >     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_view.xml"/>
> > +    <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_olap.xml"/>
> >     <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
> >     <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderTypeData.xml"/>
> >     <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderPortletData.xml"/>
> > 
> > 
> 
-- 
Antwebsystems.com: Quality OFBiz services for competitive rates