none
Urgent - How to create a dimension to get data from new relation

    Question

  • I have created a new class client and a new relation to the incidents class, now I can affect a customer to an incident. I am developing reports and I am not able to obtain the relationship between the incident and the client.. How do I create a dimension with the relationship that I created? There is another way to get this relationship?

    P.S the management pack with this cotumizations is sealed


    • Edited by JPFG Tuesday, January 24, 2012 3:55 PM
    Tuesday, January 24, 2012 11:15 AM

Answers

  • You should create both, as you are using your custom class and your custom relationship. Create a Dim for your custom class, for example:

    <warehouse>
        <dimensions>
          <dimension Accessibility="Public" HierarchySupport="IncludeDerivedClassProperties" InferredDimension="true" Reconcile="false" Target="YourClassMP!YourClass" id="YourClassDim"></dimension>
        </dimensions>
      </warehouse> 

    And then a Fact for your relationship, for example:

      <warehouse>
        <facts>
        <relationshipfact Accessibility="Public" Domain="DWBase!Domain.IncidentManagement" SourceDimension="IncidentDW!IncidentDim" SourceType="CoreIncident!System.WorkItem.Incident" TimeGrain="Hourly" id="IncidentRelatesToMyClassFact">
          <relationships RelationshipType="MyRealtionshipMP!MyRelationship" TargetDimension="DWBase!ConfigItemDim"></relationships>
        </relationshipfact>
        </facts>
      </warehouse>

    Both of these would be in one <Warehouse> block, obviously. Also, for the names (ID) don't add "vw" on the end as it will be done automatically.

    Also the Data Warehouse will, extremely annoyingly, only transfer data created after you import your Management Pack and not any existing relationships or intances of your class so bear that in mind.

    Lastly, please review the link I provided and the 2 links it takes you two for an explanation of what the various properties are and the values they can be set to.

    • Edited by Rob.FordModerator Wednesday, February 08, 2012 6:45 PM
    • Marked as answer by JPFG Wednesday, March 21, 2012 11:52 AM
    Wednesday, February 08, 2012 6:35 PM

All replies

  • Hello Rob,

    Thanks for the reply.

    I still can not understand well what I do to obtain these data.

    I nedd to create an dimension and a relationship fact? or I need only create the relationship fact?

    Regards,


    • Edited by JPFG Wednesday, February 08, 2012 12:19 PM error
    Wednesday, February 08, 2012 10:03 AM
  • You should create both, as you are using your custom class and your custom relationship. Create a Dim for your custom class, for example:

    <warehouse>
        <dimensions>
          <dimension Accessibility="Public" HierarchySupport="IncludeDerivedClassProperties" InferredDimension="true" Reconcile="false" Target="YourClassMP!YourClass" id="YourClassDim"></dimension>
        </dimensions>
      </warehouse> 

    And then a Fact for your relationship, for example:

      <warehouse>
        <facts>
        <relationshipfact Accessibility="Public" Domain="DWBase!Domain.IncidentManagement" SourceDimension="IncidentDW!IncidentDim" SourceType="CoreIncident!System.WorkItem.Incident" TimeGrain="Hourly" id="IncidentRelatesToMyClassFact">
          <relationships RelationshipType="MyRealtionshipMP!MyRelationship" TargetDimension="DWBase!ConfigItemDim"></relationships>
        </relationshipfact>
        </facts>
      </warehouse>

    Both of these would be in one <Warehouse> block, obviously. Also, for the names (ID) don't add "vw" on the end as it will be done automatically.

    Also the Data Warehouse will, extremely annoyingly, only transfer data created after you import your Management Pack and not any existing relationships or intances of your class so bear that in mind.

    Lastly, please review the link I provided and the 2 links it takes you two for an explanation of what the various properties are and the values they can be set to.

    • Edited by Rob.FordModerator Wednesday, February 08, 2012 6:45 PM
    • Marked as answer by JPFG Wednesday, March 21, 2012 11:52 AM
    Wednesday, February 08, 2012 6:35 PM
  • Hello
    thanks for your help.

    I've managed to create a dimension with the class that I created to store customer information.
    I have managed to open the MP in authoring tool and seal the MP.

     I am having dificulties in creating a Management Pack that contains the facts relation. i have already created a Managemnt pack with the fact relation but I cant open it in the authoring tool to seal it. :(

    Below I will put my xml with the dimension, and also the xml with my tests with the fact relationship.

    My Management pack that contains the de dimention.

    <ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>DataWarehouse.ClienteV1</ID>
          <Version>0.0.0.2</Version>
        </Identity>
        <Name>DataWarehouse Cliente Afectado Dimension</Name>
        <References>
          <Reference Alias="SystemWiLib">
            <ID>System.WorkItem.Library</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Alias_cliente">
            <ID>ClienteRE</ID>
            <Version>1.0.0.6</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
          <Reference Alias="DWBase">
            <ID>Microsoft.SystemCenter.Datawarehouse.Base</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Alias_Incident_S_Contact_alternate">
            <ID>Incident_S_Contact_alternate</ID>
            <Version>1.0.0.1</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
          <Reference Alias="CoreIncident">
            <ID>System.WorkItem.Incident.Library</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="IncidentDW">
            <ID>ServiceManager.IncidentManagement.Library.Datawarehouse</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Warehouse>
        <Dimensions>
          <Dimension ID="IncidentClienteAfectadoDim" Accessibility="Public" InferredDimension="true" Target="Alias_cliente!Cliente" HierarchySupport="IncludeDerivedClassProperties" Reconcile="true" />
        </Dimensions>
      </Warehouse>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="DataWarehouse.ClienteV1">
              <Name>Data Warehouse Incident Cliente Afectado Log Dimension</Name>
              <Description>This management pack adds a Incidente Cliente Afectado Log dimension to the Data Warehouse.</Description>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>


    My Management pack that contains the fact relation.

    <ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Teste.Fact</ID>
          <Version>1.0.0.1</Version>
        </Identity>
        <Name>DataWarehouse Cliente Afectado Dimension</Name>
        <References>
          <Reference Alias="SystemWiLib">
            <ID>System.WorkItem.Library</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Alias_cliente">
            <ID>ClienteRE</ID>
            <Version>1.0.0.6</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
    	    <Reference Alias="DWBase">
    		<ID>Microsoft.SystemCenter.Datawarehouse.Base</ID>
    		<Version>7.0.5826.0</Version>
    		<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    	</Reference>
          <Reference Alias="Alias_Incident_S_Contact_alternate">
            <ID>Incident_S_Contact_alternate</ID>
            <Version>1.0.0.1</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
    	   <Reference Alias="CoreIncident">
            <ID>System.WorkItem.Incident.Library</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
    	    <Reference Alias="IncidentDW">
            <ID>ServiceManager.IncidentManagement.Library.Datawarehouse</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
    	  <Reference Alias="CAfectado">
            <ID>DataWarehouse.ClienteV1</ID>
            <Version>0.0.0.2</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Warehouse>
        <Facts>
         <RelationshipFact ID="IncidentClienteAfectadoFact" Accessibility="Public" Domain="DWBase!Domain.IncidentManagement" TimeGrain="Hourly" SourceType="CoreIncident!System.WorkItem.Incident" SourceDimension="IncidentDW!IncidentDim">
            <Relationships RelationshipType="Alias_Incident_S_Contact_alternate!ClienteAfectado" TargetDimension="CAfectado!IncidentClienteAfectadoDim" />
          </RlationshipFact>
    	</Facts>
      </Warehouse>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Teste.Fact">
              <Name>Data Warehouse Incident Cliente Afectado Log Dimension</Name>
              <Description>This management pack adds a Incidente Cliente Afectado Log dimension to the Data Warehouse.</Description>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>

    and another version when i change the relationship target dimension

    <ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>Teste.Fact</ID>
          <Version>1.0.0.1</Version>
        </Identity>
        <Name>DataWarehouse Cliente Afectado Dimension</Name>
        <References>
          <Reference Alias="SystemWiLib">
            <ID>System.WorkItem.Library</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Alias_cliente">
            <ID>ClienteRE</ID>
            <Version>1.0.0.6</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
    	    <Reference Alias="DWBase">
    		<ID>Microsoft.SystemCenter.Datawarehouse.Base</ID>
    		<Version>7.0.5826.0</Version>
    		<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
    	</Reference>
          <Reference Alias="Alias_Incident_S_Contact_alternate">
            <ID>Incident_S_Contact_alternate</ID>
            <Version>1.0.0.1</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
    	   <Reference Alias="CoreIncident">
            <ID>System.WorkItem.Incident.Library</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
    	    <Reference Alias="IncidentDW">
            <ID>ServiceManager.IncidentManagement.Library.Datawarehouse</ID>
            <Version>7.0.5826.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
    	  <Reference Alias="CAfectado">
            <ID>DataWarehouse.ClienteV1</ID>
            <Version>0.0.0.2</Version>
            <PublicKeyToken>30a8145c2fd07e05</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <Warehouse>
        <Facts>
         <RelationshipFact ID="IncidentClienteAfectadoFact" Accessibility="Public" Domain="DWBase!Domain.IncidentManagement" TimeGrain="Hourly" SourceType="CoreIncident!System.WorkItem.Incident" SourceDimension="IncidentDW!IncidentDim">
            <Relationships RelationshipType="Alias_Incident_S_Contact_alternate!ClienteAfectado" TargetDimension="DWBase!ConfigItemDim" />
          </RlationshipFact>
    	</Facts>
      </Warehouse>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="Teste.Fact">
              <Name>Data Warehouse Incident Cliente Afectado Log Dimension</Name>
              <Description>This management pack adds a Incidente Cliente Afectado Log dimension to the Data Warehouse.</Description>
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>

    regardscan you help me?

    regards,

    Thursday, February 09, 2012 8:42 PM
  • Not really looked at your MPs due to time, sorry, but try putting put both the fact and dim in the same MP (the one that works), it is a lot easier to do all this with one MP rather than 2 or more.

    Also, try using fastseal.exe to seal without using the Authoring Tool, available here:
    http://blogs.technet.com/b/servicemanager/archive/2009/12/25/sealing-management-packs.aspx

    You need to add the PublicKeyToken manually if sealing with fastseal.exe (see the top of that page).

    Thursday, February 09, 2012 8:56 PM
  • Thanks Rob.Ford,

    I will try to use fastseal.exe :)

    Thanks for your help, after this I will give you news.

    Have a good weekend.

    Regards,

    Friday, February 10, 2012 11:07 AM