I'm trying to set up custom aggregated tables in our mondrian data warehouse.
I defined the custom aggregated table like this:
<Table>
<AggName name="..." ...>
<AggFactCount ...></AggFactCount>
<AggMeasure name="[Measures].[Example]" column="..."> </AggMeasureName>
</AggName>
</Table>
As long as [Measures].[Example] points to a <Measure name="Example" column="..." .../> item it works fine.
When it points to a <CalculatedMember name="Example" formula="..." ... /> then I get the following error message:
"Failed to find measure 'Example' for Cube 'ExampleCube'"
As far as I checked it online, this thing should be working for recent versions. We're using mondrian 2.4.2 which supports only Measures in AggregatedTables.
Is there any workaround, sg. like defining a cache-table?
Maybe is it enough to provide a configuration item?
Thanks,
Tamas
Related
I am trying to create a panelMenu dynamically using a list of items I have already.
But it doesn't seem to work as I get nothing as result.
So here is my code:
<rich:panelMenu id="filterListFuncPost" style="width:180px"
itemMode="ajax" groupMode="ajax"
groupExpandedLeftIcon="triangleUp"
groupCollapsedLeftIcon="triangleDown"
topGroupExpandedRightIcon="chevronUp"
topGroupCollapsedRightIcon="chevronDown" itemLeftIcon="disc">
<rich:panelMenuGroup label="Functional Positions">
<c:forEach xmlns:c="http://java.sun.com/jstl/core" var="item"
items="#{reportsBacking.selectedFunctPosIndex}">
<rich:panelMenuItem label="#{item}" />
</c:forEach>
</rich:panelMenuGroup>
</rich:panelMenu>
For whom it might help, I found a way to make it work which is to use a rich:list instead of c:forEach and it works fine.
UPDATE: Does work for RichFaces panelMenu, but only if you use the right iterator. I returned to this problem with fresh eyes and found a fairly obvious solution, but it doesn't appear to be out there on the internets yet so here it is:
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
<rich:panelMenu id="menuRoot">
<rich:panelMenuGroup id="lev1menu">
<c:forEach var="fancyGroup" items="#{myBean.myFancyGroupEntity}">
<rich:panelMenuGroup label="#{fancyGroup.name}" id="lev2menu_#{fancyGroup.id}">
<c:forEach var="fancyItem" items="#{fancyGroup.items}">
<rich:panelMenuItem label="#{fancyItem.name}" action="#{myBean.viewItem}">
<a4j:actionParam name="itemId" value="#{fancyItem.id}"/>
</rich:panelMenuItem>
</c:forEach>
</rich:panelMenuGroup>
</c:forEach>
</rich:panelMenuGroup>
</rich:panelMenu>
Why does it work? Beacuse the JSTL core components are parsed and processed before the JSF components (or something like that) and so the c:forEach renders out all the RichFaces (or other JSF) child components prior to JSF being parsed and processed. Hence the panelMenu has children of correct type by the time it gets parsed.
OLD: Won't work with RichFaces panelMenu (org.richfaces.component.UIPanelMenu) component.
I tried a similar approach using database items to dynamically generate a hierarchy of menus but when it attempts to parse it on the server side RichFaces tries to cast any children to be either panelMenuGroup or panelMenuItem and fell over with a ClassCastException trying to cast from com.sun.facelets.component.UIRepeat, which would be the same for your JSTL forEach iteration component (which is an instance of org.apache.taglibs.standard.tag.rt.core.ForEachTag on the server, I think).
I am looking for a method to check if a cube is accessable i.e. it is processed and not broken.
Example: I got a working cube and i full process a shared dimension so that the cube gets broken.
Is there any mdx or xmla method of finding out what cubes are accessable / processed?
There is an XMLA command DISCOVER_XML_METADATA that can return the state of the database (processes/unprocessed) among other properties. I don't have the best handle on XMLA, so I don't know how to get just the part you need, but this query will return results in the form of XML, and you can parse it from there.
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_METADATA</RequestType>
<Restrictions>
<RestrictionList>
<DatabaseID>AdventureWorks2012MD</DatabaseID>
</RestrictionList>
</Restrictions>
<Properties>
<PropertyList>
</PropertyList>
</Properties>
</Discover>
This requests gets the properties from the objects related to the SSAS database called AdventureWorks2012M. In the results you will see the following:
<Database>
<Name>AdventureWorks2012MD</Name>
<ID>AdventureWorks2012MD</ID>
<CreatedTimestamp>2013-08-01T01:41:10.926667</CreatedTimestamp>
<LastSchemaUpdate>2013-08-01T01:45:05.91</LastSchemaUpdate>
<Description />
<LastProcessed>2013-08-01T01:46:39.713333</LastProcessed>
<State>Processed</State>
<LastUpdate>2014-01-07T19:41:45.146667</LastUpdate>
<AggregationPrefix />
<Language>1033</Language>
<Collation>Latin1_General_CI_AS</Collation>
<Visible>true</Visible>
...
You care about <State>Processed</State>for that database. You can also get the state for each of the dimensions and measure groups as well by adding MeasureGroupID or DimensionID to the restrictions list.
Our TFS 2012 team project was migrated to a new TFS2013 server with all data.
When I now try to activate the new "Portfolio Backlog" feature the following error is presented:
[Error] TF400618: The reporting type of field
'Microsoft.VSTS.Common.StateChangeDate' in work item type 'Feature'
conflicts with the reporting type of the existing field
In Scrum 2.2 the type definitions of SharedStep and TestCase have this field definition
<FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
<WHENCHANGED field="System.State">
<SERVERDEFAULT from="clock" />
</WHENCHANGED>
<WHENNOTCHANGED field="System.State">
<READONLY />
</WHENNOTCHANGED>
</FIELD>
In the Scrum 3.0 additional the Feature has these field.
In the MSDN under TF400618: The reporting type of field '{0}' in work item type '{1}' conflicts with the reporting type of the existing field.
I'm not understanding what I need to do to resolve the issue with the feature field.
Do I need to manually alter the scrum 2.2 process template with the feature work item type , publish the changed process template into the team project and than activate the "Portfolio Backlog"?
Once you've modified your process template, TFS can't automatically install the new updates to it. Here's guidance on how to update it manually: http://msdn.microsoft.com/en-us/library/ms194972(v=vs.120).aspx
I recommend that you instead script your process template changes in a batch file so that when new versions come out, you can easily repeat your changes in the new template rather than going through the 12-step manual process above.
I wasn't able to configure Features after performing all the steps as mentioned in :http://msdn.microsoft.com/en-us/library/ms194972(v=vs.120).aspx
So I updated the Feature.xml such that the "State Change Date" FIELD name as a reportable option set to "dimentions"
After this change I updated the the default template to the one I had customized and was able to configure Features.
Here is how the updated code in Feature.xml looks:
<FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime" reportable="dimension" >
I have a little problem with a work item.
My goal is to change the <ALLOWEDVALUES> of a work item to an AD group, so that not all "ValidUsers" can get a work item assigned. For this I've created a new TFS group "TFS_AssignGroup" and added the AD-group (AD-TFS_AssignGroup) to it.
Now I've changed the work item type definition:
<FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
<HELPTEXT>The person currently working on this bug</HELPTEXT>
<ALLOWEDVALUES expanditems="true" filteritems="excludegroups">
<LISTITEM value="[project]\TFS_AssignGroup" />
</ALLOWEDVALUES>
</FIELD>
Now I expected, that the AssignedTo-field only shows the people, who are in the AD-group. But it actually only shows me the AD-group itself. So I have exactly one entry in my AssignedTo-field: AD-TFS_AssignGroup.
Any idea?
Ok, that was an easy one: It just took some time to get the data from the AD. So the solution is to do nothing and wait (or restart the TFS server).
Let's say my domain looks like this:
I have an object, Vehicle, that has an OdometerReading property.
An OdometerReading has the Miles & Date (when it was read).
I need to keep a history of all OdometerReadings for the Vehicle in the database, but don't want the entire odometer history to belong to the Vehicle object. What I would like is for the OdometerReading property map to the most recent OdometerReading entry out of the database.
I thought about mapping the whole collection of OdometerReadings to the Vehicle, and having a dynamic property called CurrentOdometerReading that would order them and return the latest one, but I don't need the whole collection under the Vehicle in my domain, and it seems like I would be getting more data out of the database than I need.
Is that possible with NHibernate? How would I map such a thing?
There are a few ways of doing this depending on what you want your domain model to look like. My preferred choice is to use a custom collection type, for example IOdometerReadingCollection, which you can add extra methods to. In this case it might be something like:
public interface IOdometerReadingCollection : IList<OdometerReading>
{
OdometerReading Latest { get; }
}
This way you can do:
OdometerReading reading = vehicle.OdometerReadings.Latest;
which I prefer to:
OdometerReading reading = vehicle.LatestOdometerReading;
There's lots of documentation about custom collections, which you can find with a simple google search.
If this approach isn't for you there are other options. You may be able to use a property with a formula (I'm not sure if that works with complex types?), or a regular NHibernate association where you'd have the key of the latest OdometerReading on your Vehicle mapping. As you also mentioned you could just load all the OdometerReadings, which depending on your use case might actually be fine.
I hope this helps, or at least points you in the right direction.
There is a "where" clause that you can put in your collection mapping. Check the reference documentation.
I would map the OdometerReading property as a component, then use a named query to ensure it's populated with the latest reading out of the database. (In this example, you'd have a sql-query with a name of "vehicle" that does the SQL to load the Vehicle columns along with the latest Odometer reading)
<class name="Vehicle">
<property name="Type" not-null="true"/>
<component name="OdometerReading">
<property name="Miles" />
<property name="Date" />
</component>
<loader query-ref="vehicle"/>
</class>