Topic
7 replies Latest Post - ‏2013-02-14T21:18:51Z by SystemAdmin
mgibson
mgibson
17 Posts
ACCEPTED ANSWER

Pinned topic Error: MetaData procedure

‏2012-05-04T04:45:16Z |
Hi,

I'm new to TM1 and I'm trying to create a continuous Time Dimension using data from a Cognos Package, the hierarchy being constructed of Year (consolidation), Quarter (Consolidation) and Month (Element) - but it's not quite working.

The TI process is creating a dimension that is successfully nesting the Quarter under the Year, but the Months aren't nested under the Quarter, despite being mapped that way under the Consolidations tab.

The only obvious thing that is occurring is the presentation of an error when the TI process finishes, the log file says;



"2012.000000",
"2.000000",
"MAY",
"5.000000",
"20120504",Data Source line (1) Error: MetaData procedure line (11): Dimension Element 
"2012-Q2" not numeric.


The dimension elements use Formulas derived from incoming values (i.e. the formulas remove decimals, or present the data a little differently), and "2012-Q2" is a result of one such formula. It correctly says that "2012-Q2" is not numeric, but I'm not sure why it is expecting it to be Numeric - I have defined all objects as Strings, and don't know why it's expecting a Numeric.

Any ideas as to whether this error is causing the nesting to fail, or how to avoid this error?

Thanks Mick
Updated on 2013-02-14T21:18:51Z at 2013-02-14T21:18:51Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    658 Posts
    ACCEPTED ANSWER

    Re: Error: MetaData procedure

    ‏2012-05-04T10:49:52Z  in response to mgibson
    It's tough to say what the issue is Mick, although I'm wondering what line 11 is in your MetaData tab. You may find that you'll want move the Generated code in your metadata and data tabs below those lines and then change the variable type to Other so that you'll have more flexibility in resolving the issue.
  • Mike_Cowie
    Mike_Cowie
    3 Posts
    ACCEPTED ANSWER

    Re: Error: MetaData procedure

    ‏2012-05-04T15:13:49Z  in response to mgibson
    Hi Mick:

    I'm going to take a guess here - you may want to paste in your Metadata TI process script to confirm.

    I'm thinking you've created your Quarter rollups as "S" or string elements. I realize TI makes this a bit confusing, but your year, quarter and month element names should have a Variable type of "String" in Turbo Integrator; otherwise you couldn't use them as element names. However, the element type for all of these should only be Numeric (N) or Consolidated (C) if you're going to use them in a hierarchy.

    In the TI script where the elements are being added, I'm guessing you have something like this:
    DIMENSIONELEMENTINSERT( 'TimeDimension', '', YearElement, 'C' );
    DIMENSIONELEMENTINSERT( 'TimeDimension', '', QuarterElement, 'S' );
    DIMENSIONELEMENTINSERT( 'TimeDimension', '', MonthElement, 'N' );
    DIMENSIONELEMENTCOMPONENTADD( 'TimeDimension', QuarterElement, MonthElement, 1 );
    DIMENSIONELEMENTCOMPONENTADD( 'TimeDimension', YearElement, QuarterElement, 1 );

    Again, just guessing, but string-type elements aren't what you'd want to use here, especially because they can't be used to rollup other N elements.

    Regards,
    Mike
    • SystemAdmin
      SystemAdmin
      658 Posts
      ACCEPTED ANSWER

      Re: Error: MetaData procedure

      ‏2012-05-04T19:39:02Z  in response to Mike_Cowie
      I would use 'N' instead of 'C.' A numeric cannot roll up into a string. The element name itself can have a mixture of characters and numbers. There are many ways of doing it, but one way that I've done this is similar to the following:

      DIMENSIONELEMENTINSERT( 'TimeDimension', '', YearElement, 'C' );
      DIMENSIONELEMENTCOMPONENTADD( 'TimeDimension', YearElement, QuarterElement, 1 );
      DIMENSIONELEMENTCOMPONENTADD( 'TimeDimension', QuarterElement, MonthElement, 1 );

      I know most generated code will insert an element then add the component, but the above code will work also.
    • mgibson
      mgibson
      17 Posts
      ACCEPTED ANSWER

      Re: Error: MetaData procedure

      ‏2012-05-06T23:58:00Z  in response to Mike_Cowie
      Hi Guys,

      Well, changing it to 'n' is counter-intuitive but it does work. I now get no error, and it appears correctly as a proper hierarchy!

      I guess that's one of the nice 'features' of TM1.

      Thanks for your help - it's much appreciated. I've used the Cognos Business Intelligence forums a lot, but not the TM1 forum much - I'm glad to see it's active and there are useful contributors about.

      Regards
      Mick
      • Erik.G
        Erik.G
        1 Post
        ACCEPTED ANSWER

        Re: Error: MetaData procedure

        ‏2013-02-14T08:07:58Z  in response to mgibson
        hello,

        I have the same error but i can not deal with this solution.

        ##Statements##
        DIMENSIONELEMENTINSERT('STR_MV','',BFS_CODE,'s');
        DIMENSIONELEMENTINSERT('STR_MV','',CTY_CODE,'c');
        DIMENSIONELEMENTINSERT('STR_MV','',CMP_CODE,'c');
        DIMENSIONELEMENTCOMPONENTADD('STR_MV',CTY_CODE,CMP_CODE,1.000000);
        DIMENSIONELEMENTCOMPONENTADD('STR_MV',CMP_CODE,BFS_CODE,1.000000);

        ##Error##
        Data Source line (1) Error: MetaData procedure line (5): Dimension Element "xyz" not numeric

        Need help!!

        King regards
        Erik
        • SystemAdmin
          SystemAdmin
          658 Posts
          ACCEPTED ANSWER

          Re: Error: MetaData procedure

          ‏2013-02-14T21:16:02Z  in response to Erik.G
          Hi Erik,

          The error means that you variable has been defined as a numeric whereas it should be a string.

          To fix this, on the Variables tab change the Variable Type from Numeric to String, save the process then try executing it again.

          Hope this helps.

          Rod
          • SystemAdmin
            SystemAdmin
            658 Posts
            ACCEPTED ANSWER

            Re: Error: MetaData procedure

            ‏2013-02-14T21:18:51Z  in response to SystemAdmin
            Hi Erik,

            Just realised you are tying to add a String element (S) to a consolidation. You can't do this, you can only have N type elements in a consolidation, strings must be orphans.

            Apologies for the confusion.

            Rod