Planning Analytics

 View Only
Expand all | Collapse all

PA - TI doesn't cycle in Metadata tab

  • 1.  PA - TI doesn't cycle in Metadata tab

    Posted Tue January 28, 2020 09:11 AM
    Dears,

    We are running PAL 2.0.7, and come across a strange behaviour of a TI process. It's really a simple process, updating from an ODBC datasource a couple of dimension (metadata tab), and updating data (through the data tab) in a cube. What's strange is that this TI cycles in data tab and skips completely metadata tab. As result throws errors because the dimensions are not up to date, in the tentative of updating a great deal of records. 

    As workaround I've used the "direct" functions in data tab that worked like a charm.

    Is it something have you been struggling with, or Am I mistaken somehow?

    Thanks and regards,
    Angelo



    -------------------------------------------------------------------------------------------------------------
    The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

    For details about the personal information we process and why, please see our Privacy Notice
    -------------------------------------------------------------------------------------------------------------


    #PlanningAnalyticswithWatson


  • 2.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Tue January 28, 2020 12:03 PM
    Hi,
    This may seem like an odd question, but on what lines are your metadata commands?   Also are you making these changes using Architect or the Workspace TI editor?

    ------------------------------
    Scott Brown
    ------------------------------



  • 3.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Wed January 29, 2020 03:59 AM
    Hi Scott, 

    Thank you for your answer. This is what I'm doing, it's more than regular activities in metadata:
    ------
    IF(DIMIX(ELEMENTEXISTS?)=0);
      DimensionElementInsert(THENCREATEIT, 'c');
    ENDIF;

    IF(DIMIX(ELEMENTEXISTS?)=0);
       DimensionElementInsert(THENCREATEIT, 'n');
       DimensionElementComponentAdd(ADDTOACONSOLIDATEDNODE);
    ENDIF;
    ----

    I'm using Architect. I suspect this might be related to the SQL query that takes sometime and triggers somehow a timeout letting it skip metadata, so it jumps directly to data tab.

    Thanks and regards,
    Angelo


    ------------------------------
    Angelo Salvatore Biundo
    ------------------------------



  • 4.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Wed January 29, 2020 07:29 AM
    Are you sure the Metadata tab is being skipped?  Can you add a line to the top of the Metadata security such as ASCIIOUTPUT('../metadata.txt', SOMEVARIABLE); and verify that no text file is being created when you run the TI process.  Assuming you don't get a text file created then t he Metadata tab is being skipped as you suggest.  Otherwise, the issue is with the logic in your TI.  I've not seen a case where a section of a TI is incorrectly skipped.

    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 5.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Wed January 29, 2020 07:37 AM
    Hi Stuart,

    Yes, I did it. Debugging the code with ASCIIOUTPUT, I checked all the tabs and it skips metadata going from prolog to data tab.

    I'm not using any itemskip in prolog, where I'm declaring constants and viewing zeroes out my view before loading.

    Thanks,
    Angelo

    ------------------------------
    Angelo B.
    ------------------------------



  • 6.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Wed January 29, 2020 09:17 AM
    Hi,

    I can tell you more, I also tried to add a variable (in variables tab) putting the ASCIIOUTPUT(writesomething) to run in metadata, and an ASCIIOUTPUT(writesomethingelse) in the metadata itself. So the result was, I could see the first file but not the second one.

    Indeed it's not looping in.

    Thanks,

    ------------------------------
    Angelo B.
    ------------------------------



  • 7.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 03:06 AM
    Just mentioning this in case you were unaware of it, and in case it could be part of the problem: "If you use the ASCIIOutput function to write to the same file in multiple procedures (tabs) of a TurboIntegrator process, the file will be overwritten each time it is opened for a new procedure."(from the IBM documentation). So if debugging, then best to use different file name on each tab.

    Regards,

    Mark

    ------------------------------
    Mark Hackett
    ------------------------------



  • 8.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 03:43 AM
    Hi Mark,

    Thank you for your message! Yes I've used different file names, for any asciioutput used within the same and different tabs:-/.

    Regards,



    ------------------------------
    Angelo B.
    ------------------------------



  • 9.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 07:12 AM
    Good call Mark!

    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 10.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 03:33 AM
    Edited by System Fri January 20, 2023 04:20 PM
    Hi,

    Maybe a silly question but how are your variables defined? Variables have options Metadata/Data/Both. If all are set to Data it will jump straight to Data.
    EDIT: of course won't jump, but variable is ignored.
    /Jaakko

    ------------------------------
    Jaakko Kähärä
    ------------------------------



  • 11.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 03:59 AM
    Hello Jaakko,

    For debugging purposes I've created one variable and it runs on Metadata tab with an ASCIIOUTPUT. 

    KR,
    Angelo

    ------------------------------
    Angelo B.
    ------------------------------



  • 12.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 04:40 AM
    Dears,

    This is just to give you an idea.



    Looking at the TM1 server log, there seems to be a message (warning?) saying that the query may require a token. It anyway compiles and runs properly also giving right results.

    Thanks,


    ------------------------------
    Angelo B.
    ------------------------------



  • 13.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Thu January 30, 2020 12:57 PM
    If you look at the metadataregoing.txt does it have a line for each record the SQL should provide?
    I am wondering if the token error message is happening when it is trying to read the variable from the record and it does not get to the second line of the process.

    ------------------------------
    Scott Brown
    ------------------------------



  • 14.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Fri January 31, 2020 01:40 PM
    Dear Scott,

    it contains just one line and nothing else, I also moved all the objects to a different server with TM1 10.2.2 (we are in the upgrade to PA), and it's working correctly, looping in metadata tab regularly. I haven't seen any ODBC warning in the log though.

    Kindest regards,
    Angelo

    ------------------------------
    Angelo B.
    ------------------------------



  • 15.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Fri January 31, 2020 11:29 AM
    Hi, 

    for variable, you can put initial variable in prolog, because prolog will be executed once. And the variable value still use in the other tabs. It is not like ascioutput that overwrite start from zero again. 

    This is the simple concept of TI that I understand: 

    Regards,






  • 16.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Fri January 31, 2020 02:00 PM
    Hi Veronika,

    Thank you for your message. The use of new variable with asciioutput was purely for debugging purposes. My datasource is a DB2 table and contains multiple variable, I'm using three of them to update dimensions (in metadata tab) hence data update in data tab. When you do a metadata change (typically dimension updates), in prolog and metadata tab, those are applied to a copy of the dimension and committed to the real dimension at the end of metadata tab. In theory I'm expecting the TI won't cycle in Metadata it shouldn't neither in data tab. In this case it's completely ignoring metadata and going straight to data tab. To overcome this inconsistency I'm using "direct" functions in data tab, but it's not the regular way of working. I've also tested this in TM1 10.2.2 and it's working as expected.

    Thanks,
    Angelo

    ------------------------------
    Angelo B.
    ------------------------------



  • 17.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Fri January 31, 2020 05:56 PM
    Hi

    The reason that your MetaData is not working is that all the statements that actually affect the dimension are within IF statements. You must have at least one statement that affects the dimension that is not in an IF statement. It is probably a long standing bug but it seems that if TI sees IFs around everything on the MetaData tab for some bizarre reason it decides that the MetaData tab isn't needed.

    You don't actually need the IFs at all. Ti is clever enough that it won't insert duplicate elements or anything like that. Just remove the IFs and it will work. 

    If the purpose of your statements is just to ensure that a small number of new codes encountered in your data source are inserted before loading data, then it is actually more efficient to leave the MetaData Tab blank altogether to avoid an unnecessary pass over the data, and to use IF( element exists ... with the Direct version of the Insert and ComponentAdd statements. This is because if you use the MetaData tab there will be a full dimension rebuild, which takes longer and locks any cubes with that dimension for longer. By comparison, the Direct statements effectively tack the new elements on to the end of the existing dimension, so it is a more minor update. However, over time, you do need to compress the dimension down using DimensionUpdateDirect, so be sure to schedule this.

    On the other hand, if you are lets say unwinding the hierarchy on the Prolog, ie breaking links to consols, doing a full update on the MetaData Tab, and then storing Attribute values on the Data Tab, then your approach is OK. There are better approaches but they aren't worth the trouble if the dimension is not that big and can be updated overnight.

    Regards

    Paul Simon

    ------------------------------
    Paul Simon
    ------------------------------



  • 18.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Mon February 03, 2020 04:50 AM
    Dear Paul,

    Thank you for your extensive explanation, really helpful.

    Yes, Indeed I would need to review and optimize the code adapting the IFs statements. However I did a couple of additional tests:

    1. Testing with TM1 10.2.2, it seems working regularly with no issues and at an acceptable timing. of course using the same TI.
    2. As per your suggestion with PA, removing all the IFs, seems to be working, though it takes more time to complete (running time is at least doubled).
    Thanks!
    Kindest regards,
    Angelo

    ------------------------------
    Angelo B.
    ------------------------------



  • 19.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Mon February 03, 2020 09:19 AM
    I wasn't aware of the issue with the IF statements.  I will test this and open a defect if I can reproduce.

    In regards to the performance difference....please test with 2.0.9.  There are some fairly important optimizations in 2.0.8 and 2.0.9 to improve Ti process performance and make TI performance more stable moving forward (e.g future updates should have less impact on Ti performance).

    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 20.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Mon February 03, 2020 05:23 PM
    Hi Angelo

    There is a simple reason why the run time has doubled. When you had the IFs in the MetaData tab, it wasn't doing anything. Now it is, so you have effectively got another pass over the data and a full dimension re-build.

    If you do want to optimise performance, then I suggest that you try my suggestions around updating a copy of the dimension and then applying only the changes with the Direct statements. However, it is quite a lot of work to develop this. I have developed a library of routines that do this for classic dimennsions and the newer Named Hierarchies.. 

    I am surprised that you did not get this problem in 10.2.2 as this has been a long term issue in TM1. It was certainly there in 10.1 and I pretty sure in 9.5

    Regards

    Paul Simon

    ------------------------------
    Paul Simon
    ------------------------------



  • 21.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Tue February 04, 2020 03:42 AM
    Hi Paul,

    Thank you very much for your answer! Yes, I'll certainly convert to "direct" statement and schedule a chore with "update" functions. So far I have few TIs, not many. I never had issues, as far as I remember with TM1 9.5.2, neither with 10.1.1.

    ----OT-----
    I also love scripting with TM1 Objects mostly with VBA/VBS and something done with Java, mainly to kill manual jobs. 
    Once I have time I'm curios to play with Rest API libraries.
    Which one APIs did you use? Do we got any cool API? Years ago, before taking a pause from TM1 (unfortunately), I was trying to develop a script which could publish a TI without restarting the instance, it's handy when you want to speed up deployments.
    ----------

    Thanks and kindest regards,
    Angelo


    ------------------------------
    Angelo B.
    ------------------------------



  • 22.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Tue February 04, 2020 06:16 PM
    Hi Angelo

    In the past I have done a lot with the VB/C API. However, now the only API with any future is the Rest API. With that you can promote a TI to a live server.

    Fortunately, we have an overnight batch window so we do all promotes overnight by restarting the server, and promotes go in via. a mixture of DOS Batch and TI.

    Promoting during the day can be useful at times. However, there are some considerations against this. For example a system that can operate in different ways at different times of the day can be confusing for the users and can be difficult to audit.

    Regards

    Paul Simon

    ------------------------------
    Paul Simon
    ------------------------------



  • 23.  RE: PA - TI doesn't cycle in Metadata tab

    Posted Tue February 04, 2020 03:17 AM
    Dear Stuart,

    Thank you very much for your input. Unfortunately our upgrade to PA 2.0.7  is on-hold due to a defect (already raised) with PA connectors to CA (any version). :-(

    Once we have more clarity on this we can think to plan to 2.0.8/2.0.9.

    I'll let you know if I have more updates.

    Thanks and kindest regards,
    Angelo

    ------------------------------
    Angelo B.
    ------------------------------