Giter VIP home page Giter VIP logo

bedrock's Introduction

What is Bedrock?

Bedrock is a TM1 / Planning Analytics best practice that brings together information and experiences for business intelligence professionals. The code and resource libraries on this site specifically assist the IBM TM1 / Planning Analytics user community and contain assets to increase the value of TM1-based applications within minutes. This collective knowledge is shared here from a vast array of projects in different organisations and industries globally.

Bedrock is TM1 Best Practice assets built from years of TM1 experience consisting of Training, White Papers and Toolkits.

Trialled and implemented for over many years in numerous highly complex TM1 sites, results have shown:

  • 30-50% reduction in TI coding due to a new functional method employed.
  • Increased scalability in terms of business logic complexity, data sizes & concurrency.
  • Dramatically faster proto-typing phase.
  • Increased auditing & testing via standardised logging system.
  • Reduction in Developer/Administration training.
  • Reduction in cost of Administrating TM1.

Minimum TM1 / IBM Planning Analytics Version

The latest release bedrock v4.1.3 is a complete rebuild of the bedrock library for Planning Analytics 2.x (TM1 Server 11.x). Due to incorporation of support for new Planning Analytics features (alternate hierarchies, temporary objects, processes execution on independent threads) please note that the minimum supported version is PA 2.0.6 (TM1 Server 11.4).

What do I need for v4?

For bedrock v4 the TI process source code has been split into 2 folders:

  • main: this contains all the bedrock 4 processes. For any new project using Planning Analytics theses are the processes you need
  • b3shell: the processes in this folder have the same names as the old bedrock v3 processes. However, they are not the old processes. Rather they are "caller shells" which do nothing more than call the new bedrock 4 processes to produce the same behaviour from the same parametes as in bedrock 3. These processes are included for backwards compatibility and unit testing for models where bedrock 3 is already implemented. This allows anyone with a model where many custom processes call the bedrock library to switch and test bedrock 4 without any code change to existing custom processes. For anyone implementing bedrock for the frst time you don't need and shouldn't include these processes.

Where is Bedrock v3?

If you are still using TM1 Server 10.2.2 the Bedrock 3 processes are still available. You can find them in the v3-archive branch.

Why Bedrock?

Given that there is a large uptake of TM1 globally there exists an education gap that is ever widening. With this hunger for standards and experience, Bedrock is not just a home for all these questions on how TM1 works from the ground up or what the best implementation methodologies are. Uniquely, it is a quick-start collection of assets to dramatically increase efficiency and effectiveness of your TM1 system.

There is a firm belief within the contributors of this site that TM1 systems are capable of much more valuable business insights than other products in the marketplace. Financial Reporting, Financial Budgeting or Operational Planning systems may be attempted by many products and could easily be successful. However, these are "First Phase" systems and business value takes a quantum leap when the Operational and Financial are automatically linked - not by over-night batch processing but by real-time automatic calculations. Bedrock's genesis was exactly this - a code name for an internal methodology originally named to "initiate standards and Best Practice TM1", ultimately culminating in the uninhibited growth of TM1 systems. Hence Bedrock is about "Second Phase" TM1 systems and beyond.

It should be emphasized that Bedrock is not intended as a vehicle for commercial gain. See “How to Licence”. It is intended solely to increase TM1 knowledge and standards so that all implementers, whether professional services or end users can drive better results for the end user company and ultimately ensure TM1's unique platform is demonstrably superior to other business intelligence products.

The future for Bedrock depends largely on the TM1 community to help build out the education and tools already contained on this site. If you benefit from these assets, please take the time to give back in the near future.

Who is it for?

Resources at Bedrock should be used by anyone involved in the creation, implementation, management and support of IBM TM1 / Planning Anaytics systems especially those with an interest in a shared, best practice approach.

This includes developers, support analysts, administrators, IT managers, consultancies, sub-contractors and even end users wanting to step into development or administration.

Developers, Consultancies and Sub-contractors

Each and every TM1 system is a balance of Functionality, Performance & Maintainability. It is a never-ending battle as business requirements and environments changes. Bedrock for TM1 incorporates up-to-date Black Belt Best Practice techniques and tools so that your end-customer can get the optimal balance right now and into the future. Developer's build-time will be reduced with greater ease of proto-typing ensuring a greater fit-for-purpose to suit the business needs better.

Administrators and IT Managers

Business as Usual (BAU) administrators will be more responsive due to more consistent auditing and more simplistic, standardised code. They will see more audited activity culminating in less "black box" risk. Succession issues will be less risky due to better standards and understanding of the system.

End Users

End Users who never thought they could develop now find TM1 simpler and clearer to develop and administrate. Bedrock for TM1 shortens and flattens the Learning Curve for development.

Where can I get more information?

The first place for further information is the code.cubewise.com/bedrock website.

Key resources:

  • Check out the What's New page to familiarize yourself with what is different versus the previous version.
  • Bedrock Wiki. Each process has a full documentation of what it does, the intended purpose, needed parameters, and dependencies within the library.

White Papers:

How to License

Anyone is free to copy, modify, use, compile, sell or distribute the original Bedrock code, documents and information (the information), either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means, with the exception that you may not reproduce or publish the information on any web site, online service or printed media without prior express permission.

Where the information is copied, modified, used, compiled, sold or distributed, credit to the original author or authors must be left intact in the code or document.

All of the deliverable code on this site has been written from scratch. No code has been taken from other projects or from the open internet. Every line of code can be traced back to its original author. So the Bedrock code base is clean and is uncontaminated with licensed code from other projects.

Warranties

All of the code, documents and information in Bedrock for TM1 are to be deemed without warranty.

Contributions

The source code is hosted at github.com/cubewise-code/bedrock. If you find a bug or feel like you can contribute please fork the repository, update the code and then create a pull request so we can merge in the changes.

bedrock's People

Contributors

4rtem avatar ajastrzebska avatar cw-cleung avatar cwcibo avatar grandryjn avatar hepatic-git avatar jkp713 avatar lbrowncubewise avatar lotsaram avatar macmaj avatar macsir avatar marfrit avatar mariuswirtz avatar mateuszoszer avatar matickin516ht avatar mdegiovanni avatar mmastrolonardo avatar onefloid avatar payion avatar pbuncik avatar piotrrajtar avatar raducantor avatar rycy85 avatar strangiato avatar tomasfelcman avatar vviau avatar vzbrink avatar wimgielis avatar ykud avatar yyzz1010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bedrock's Issues

Question regarding }bedrock.cube.view.publish

Describe what you did so far.
It's probably just me, but...
I execute process }bedrock.cube.view.publish and omitted parameter pCube.
The process nevertheless returns "Process completed successfully".
tm1server.log includes an error.

Describe what's not working the way you expect.
Didn't get the expected result? Describe:

  1. I would expect error msg instead of "Process completed successfully".
  2. NA

Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.7

Additional context
NA

hier.sub.create

hier.sub.create has incorrect pLevelTo parameter. Should be 999.
Also accept * for "ALL" in addition to blank for consistency with rest of library.

Linux compatibility

Is your feature request related to a problem? Please describe.
Bedrock does not fully support Linux due to

  1. Built-in assumption that path delimiter is "" and not "/" when evaluating paths and whether a target folder exists
  2. Some features rely on command line execution which is Windows specific

Describe the solution you'd like
Bedrock should run on Linux without modification.

Cube.View.Create - Allow 'pFilter' to contain elements with spaces

Hi,

I've elements with a space inside, instead off creating another alias, i've added following change to the prolog:

Old Code:

    # Ignore spaces
    IF (TRIM(sChar) @<> '' );

      ### Dimension Name ###

New Code:

    # Ignore spaces
    IF (TRIM(sChar) @<> '' );
	
      # Convert special character in element to 
space - todo make this character a parameter
      IF ( sChar @= '§' ) ;
        sChar = ' ' ;
      ENDIF;

      ### Dimension Name ###

Kind regards,
Jimmy

}bedrock.hier.create.fromattribute does not process pTopNode without <pAttr>

pTopNode parameter does not take values without

Current code:

IF( Trim( pTopNode  ) @= '' );
    sTopNode = 'All ' | pAttr;
ElseIF( Subst(Trim( pTopNode ),1,7 ) @= '<pAttr>'  );
    sTopNode = pAttr | ' ' | Subst( pTopNode, 8, Long( pTopNode ) );
ElseIF( Subst( pTopNode, Long( pTopNode )-7, 8 ) @= '<pAttr>'  );
    sTopNode = Subst( pTopNode, 1, Long( pTopNode )-8 )  | ' ' | pAttr;
ElseIF( Scan( '<pAttr>', pTopNode ) >0 );
    sTopNode = Subst( pTopNode, 1, Scan( '<pAttr>', pTopNode )-1 ) | pAttr | Subst( pTopNode, Scan( '<pAttr>', pTopNode )+7,Long(pTopNode) );
EndIf;

Proposal to change:

IF( Trim( pTopNode  ) @= '' );
    sTopNode = 'All ' | pAttr;
ElseIF( Subst(Trim( pTopNode ),1,7 ) @= '<pAttr>'  );
    sTopNode = pAttr | ' ' | Subst( pTopNode, 8, Long( pTopNode ) );
ElseIF( Subst( pTopNode, Long( pTopNode )-7, 8 ) @= '<pAttr>'  );
    sTopNode = Subst( pTopNode, 1, Long( pTopNode )-8 )  | ' ' | pAttr;
ElseIF( Scan( '<pAttr>', pTopNode ) >0 );
    sTopNode = Subst( pTopNode, 1, Scan( '<pAttr>', pTopNode )-1 ) | pAttr | Subst( pTopNode, Scan( '<pAttr>', pTopNode )+7,Long(pTopNode) );
Else;
    sTopNode = pAttr;
EndIf;

Upgrading from V2.0.2 to V3

Hi looking at upgrading to V3 but don't want to break the V2.0.2 processes.

Are there any upgrade issue of can I just replace the V2.0.2 process with V3

Brian

}bedrock.cube.data.copy.intercube

Hello,

I have 6 remarks on this process.

  • There is a typo 'dimensons' in the documentation.
  • Can we add to the documentation section in the Prolog tab how many dimensions in the cube(s) this process can handle ? Max. 27 ?
  • I see in the code: 'ASCIIOUTPUT( '..\TgtFilter.txt', sTargetFilter );' Is this intended or leftover from testing ?
  • I read in the documentation: "If using the pFilterParallel parameter the single dimension used as the "parallelization slicer" cannot appear in the pFilter parameters." This means that if I want to copy Jan, Feb, Mar, Apr data usign parallelization, and I use the month dimension as the 'pFilterParallel', all months will be looped upon 1 at a time ? Also for example December ? Or is the TI smart enough to only have 4 instances of a RunProcess call (1 for each of the 4 months in the Filter parameter) ?
  • The first exercise that I wanted to tackle with this process, involves copying data on 4 measures. As my measures dimensions are always named uniquey per cube, I need to use the 'pMappingToNewDims' parameter, right ? This means 4 different calls to this Bedrock process ? Not sure this is going to be very useful in the end. For 20 measures (out of 30 in the dimension for example) this is an issue I think.
  • an extension: could we make use of (public) subset names in the different filters ? That will increase the usefullness of the process a lot. The logic would be: if a subset exists with that name, use it. If not, test if the name exists as an element in the dimension. If yes, use it. If not, error message. For example, I need to copy daily data. Both source and target cube share the dimension. Days roll up in months, months roll up in years. I want to copy the daily data for only 2019-Jan, 2019-Feb, 2019-Mar, 2019-Apr. How can I do this without the use of subsets, without 'children of' kind of selections - avoiding hardcoding 120 daily elements.

Typo in server.wait

Describe the bug
Process will error is pLogOutput=1 as sWaitSec not initialzed before passed to LogOutput due to typo.

All cube.data processes should support active sandbox

Is your feature request related to a problem? Please describe.
Bedrock doesn't support sandboxes. The cube.data processes should support sandboxes.

Describe the solution you'd like
There should be a parameter to use sandbox.

}bedrock.hier.create.fromsubset won't copy rollup from alt hierarchy to main or another alt hierarchy

Describe the bug
If you want to copy a rollup from an alternate hierarchy to the main hierarchy or another alternate hierarchy, the rollup won't be properly created.
The reason is that at line https://github.com/cubewise-code/bedrock/blob/master/main/%7Dbedrock.hier.create.fromsubset.pro#L246 we set the descendant attribute for the source hierarchy but at line https://github.com/cubewise-code/bedrock/blob/master/main/%7Dbedrock.hier.create.fromsubset.pro#L315 we always look at the main hierarchy. Therefore you won't be able to ever use a rollup or subet in an alternate hierarchy as a source.

Solution:
replace line https://github.com/cubewise-code/bedrock/blob/master/main/%7Dbedrock.hier.create.fromsubset.pro#L315
with sDecendant = ElementAttrS(pSrcDim, pSrcHier, sElName, cHierAttr);

To Reproduce
Steps to reproduce the behavior:

  1. Have a dimension with multiple hierarchies
  2. Try to copy a rollup from one of the hierarchies using }bedrock.hier.create.fromrollup either to a new hierarchy or to main one
  3. Check the result and observe that the new rollup is completely broken.

Expected behavior
You should be able to copy a rollup from an alternate hierarchy

Screenshots
If applicable, add screenshots to help explain your problem.

Version

  • OS: Win 2012 R2
  • TM1 Server Version: 11.5.0.23

Additional context
Add any other context about the problem here.

}bedrock.cube.data.copy.intercube clears whole target cube despite pFilter parameter

Describe the bug
}bedrock.cube.data.copy.intercube will clear whole target cube event if the pFilter parameter is specified and filtered dimension/elements exist in both source and target cube.

To Reproduce
Steps to reproduce the behavior:

  1. Go to process '}bedrock.cube.data.copy.intercube'
  2. As pSrcCube, pTgtCube parameter values pick any cubes with same dimensionality and use pFilter to slice both source and target cube
  3. Target cube is cleared completely despite pFilter was set.

Expected behavior
According to pZeroTarget documentation: OPTIONAL: Zero out Target Element PRIOR to Copy? (Boolean 1=True) Clears combination of pFilter and pMappingToNewDims

Screenshots
NA

Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.6.

Additional context
Variable used for clearing target cube view sTargetFilter is empty, variable sFilter is set to pFilter and '+' concatenated to the end of pFilter.

}bedrock.cube.data.copy.intercube won't work for cube with 13 dimensions

The process will output error when running on a cube having 13 dimensions.

To Reproduce
Steps to reproduce the behavior:

  1. Run with parameters pSrcCube - any cube having 13 dimensions
  2. Result is error that last dimension is missing an input element in pMappingToNewDims.

Expected behavior
Process should work on any cube up to 27 dimensions.

Screenshots
NA

Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.6

Additional context
The issue is located in prolog code - invalid variables are populated with values in cases of cube with 13 and 14 dimensions. The issue is most probably a typo.

}bedrock.cube.rule.manage.pro

A question. What is the idea behind:

##Create Blank Rule file in the data directory
IF(FileExists( cBlankRuleName ) = 0 );

sFile = '.' | cBlankRuleName;

sCommand = 'cmd /c "(echo SKIPCHECK;) > ' | sFile | '"';
ExecuteCommand ( sCommand, 0 );

sCommand = 'cmd /c "(echo FEEDERS;) >> ' | sFile | '"';
ExecuteCommand ( sCommand, 0 );

ENDIF;

Couldn't it be 2 lines of AsciiOutput instead ?

}bedrock.cube.data.copy.intercube will not copy values into }ElementAttributes cube

Describe the bug
Using the process to copy values into }ElementAttributes cube (pTgtCube) won't copy values properly and will output minor errors (line 48) - Element "..." not found in dimension "}ElementAttributes_..."

To Reproduce
Steps to reproduce the behavior:

  1. Go to process }bedrock.cube.data.copy.intercube
  2. Set pTgtCube to }ElementAttributes cube
  3. Run the process.

Expected behavior
Data copied and no minor errors are output.

Screenshots
NA

Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.6.

Additional context
NA

Bedrock.cube.dimension.add (option to keep data results in error)

Describe the bug
ERROR when trying to add dimension with TI }bedrock.cube.dimension.add

To Reproduce
Steps to reproduce the behavior:

  1. Go to process 'TI }bedrock.cube.dimension.add'

  2. Run with parameters see screenshot below.
    screenshot3 1

  3. Result is the process stalls once clone cube created.
    "}bedrock.cube.data.copy.intercube": Error on line 992
    Syntax error on or before: "
    ( cThisProcName, 'pL
    equal sign not found " : Could not initialize process

    Expected behavior
    Expected the dimension to be added to the cube at position 1 with data
    Screenshots

After run clone left and dimension not added

screenshot4

Version

  • OS: Windows 10 Ed
  • TM1 Server Version: 11.2

Additional context

Local instance of TM1 running in Bootcamp

minor error dim.clone & hier.clone

Describe the bug
dim.clone not testing for CellIsUpdateable
dim.clone & hier.clone not distinguishing btw AA & AS for enforcing unique value.

}bedrock.dim.clone takes way to long for large dimensions

Describe the bug
A clear and concise description of what the bug is.
}bedrock.dim.clone takes too long to clone large dimensions
I looked into the code and found that }bedrock.hier.unwind is the culprit
please model it based on V3 bedrock for one hierarchy so that it becomes blazingly fast

To Reproduce
Steps to reproduce the behavior:

  1. Go to process '...'
  2. Run with parameters '....'
  3. Result is '...'

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Version

  • OS: [e.g. Windows Server 2106]
  • TM1 Server Version: [e.g. 11.4]

Additional context
Add any other context about the problem here.

Add ProcessExecute example snippet in prolog

Is your feature request related to a problem? Please describe.
In most cases a developer should have access to either an IDE which supports auto-complete for TI processes or a free AHK app to achieve the same result in more basic editors. However, when these options are not available a "low tech" helpful feature would be for the header of each bedrock process to contain a snippet to call the process which can simply be copy/pasted by the developer into whichever custom process they are writing.

Describe the solution you'd like
Insert a region immediately above the GeneratedStatements. Example below for }bedrock.chore.execution.check for no other reason than it is alphabetically the first bedrock process.

#Region CallThisProcess
# A snippet of code provided as an example how to call this process should the developer be working on a system without access to an editor with auto-complete.
If( 1 = 0 );
ExecuteProcess( '}bedrock.chore.execution.check', 'pLogOutput', pLogOutput,
    'pMonthDays', '',
    'pWeekDays', '',
    'pDelim', '&',
    'pStartTime', 0,
    'pEndTime', 24
);
EndIf;
#EndRegion CallThisProcessExample
#****Begin: Generated Statements***
#****End: Generated Statements****

Note: the snippet is provided within a non-executing IF rather than commented out for the explicit purpose of making copy/paste to a custom process as easy as possible.

Describe alternatives you've considered

Additional Information
See #26

}bedrock.hier.element.delete does not include base hierarchy when pHier = *

Describe the bug
If you assign a ‘*’ in pHier in the process }bedrock.hier.element.delete, it removes the elements from all hierarchies except the base hierarchy – this is not intuitive, as you would assume that it then takes all hierarchies into account.

To Reproduce
Steps to reproduce the behavior:

  1. Prepara a dimension that has multiple hierarchies with elements
  2. Run the process '}bedrock.hier.element.delete' with parameters 'pHier' = *, pElem = *, pDim = Test dimension
  3. Result is: The elements of the base hierarchy will still be there.

Expected behavior
One would assume that the elements of the base hierarchy are also removed when running this process with pHier=*.

Screenshots
If applicable, add screenshots to help explain your problem.

Version

  • OS: [e.g. Windows Server 2016]
  • TM1 Server Version: [e.g. 11.4]

Additional context
Add any other context about the problem here.

}bedrock.cube.data.copy won't copy strings on consolidated levels - pSuppressConsol parameter is missing

Describe the bug
The process is supposed to copy values intra-cube. This should apply for String values and depending on pSuppressConsol parameter it should be possible to choose the consolidated levels to be included in the copy.
The pSuppressConsol parameter is missing in the process. There is certain logic implemented in the process that sets internal variable sSuppressConsol to 0 only in case when mapping between elements is applied on C level element. Hence there is no way how to instruct the process to not skip consolidated elements if needed for example when copying Strings.

To Reproduce
Steps to reproduce the behavior:

  1. Run the process with pCube set to an }ElementAttributes cube, set mapping to copy any string attribute to another one. Make sure that the base dimension contains consolidated elements.
  2. Check which element attribute values were copied - consolidated elements were skipped.

Expected behavior
The process should be consistent with B3 in terms of its results - thus pSuppressConsol parameter should be implemented.

Screenshots
NA

Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.6.

Additional context
NA

}bedrock.hier.clone with attributes and CellIsUpdateable

When }bedrock.hier.clone is used to copy hierarchy including attributes there's case where error log is created even though everything works almost as it should

  • Cloned hierarchy must be other than default hierarchy
  • Cloned hierarchy must have elements that are not in default hierarchy

I suppose error ouput is made for each element no in default hierarchy because of following line in process. Process checks if it's okay to write into cube using CellIsUpdateable. However, since element is in other than default hierarchy, this function probably cannot check for that and produces error. I checked IBM documentation, but didn't find if there is similar function, that would take hierarchies in consideration?

Line 30 on data:
If( CellIsUpdateable( '}ElementAttributes_' | pTgtDim, vEle, sAttrName ) = 1 );

Error is similar to this:

"3",Data Source line (4) Error: Data procedure line (30): Invalid key: Dimension Name: "Project", Element Name (Key): "3"

The effect on process performance is minor, but I'd rather not see error logs on every run in this kind of situation.

Documentation error: parameter prompt string contains wrong delimiter

Describe the bug
In v4 the default element start delimiter was changed from ":" to "¦" to avoid ambiguity as ":" can also be used internally within the dimension name string to denote an alternate hierarchy. However the prompt string was not updated, hence the default value and the documentation is not aligned which is confusing for users.

Expected behavior
Documentation / prompt string should be updated to be consistent with the default value.

}bedrock.hier.clone.pro might have bug with hierarchy unwind

It seems that unwind process parameters are not working as intended in }bedrock.hier.clone.pro process. Unwind always targets default hierarchy (pTgtDim) instead of pTgtHier. Also, pConsol value '' means that }bedrock.hier.unwind doesn't seem to unwind. Value should probably be '*'.

### Create target dimension Hierarchy ###
If( HierarchyExists( pTgtDim, pTgtHier) = 0 );
    HierarchyCreate( pTgtDim, pTgtHier );
Else;
    IF(pUnwind = 1 );
      ExecuteProcess('}bedrock.hier.unwind',
        'pLogOutput', pLogOutput,
        'pDim', pTgtDim,
        'pHier', pTgtDim,
        **'pConsol', '',
        'pRecursive', 1**
        );
    ELSEIF(pUnwind = 2 );
      #Do nothing
    ELSEIF(pUnwind = 0 );
      HierarchyDeleteAllElements( pTgtDim, pTgtHier );
    EndIf;
EndIf;

}bedrock.hier.unwind do not unwind all with pRecursive = 1

}bedrock.hier.unwind behave differently as Bedrock 3 unwind.
For example with this hierarchy,
image
and this parameter
image
gives
image
Element "A", "B", "C" are still attached the "All".

In Bedrock 3 it should flat out all hierarchy with pRecursive = 1, including the direct children (A,B,C) under "All", gives 2 empty consol (A, B), and an orphan C.

}bedrock.cube.view.publish error on pClient

Describe the bug
Process }bedrock.cube.view.publish returns error because of error in Epilog: pClient is not a parameter used in this process.

Else;
sProcessAction = Expand( 'Process:%cThisProcName% successfully published view %pView% in cube %pCube% created by cient %pClient%.' );

To Reproduce
Steps to reproduce the behavior:

  1. Go to process '}bedrock.cube.view.publish'
  2. Run with parameters 'Existing Cube/View & rest is defaults'
  3. Result is 'Error: Epilog procedure line (16): Variable "pClient" not found'

Expected behavior
No errors on successful execution

Screenshots
NA
Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.7 (11.5.00000.23)

Additional context
NA

Invalid param in LogOutput of }bedrock.hier.element.move

Describe the bug
pWeight param is incorrectly referred to as pElWeight within an expand string. This will cause an error if the process is run with pLogOutput=1

To Reproduce
Run }bedrock.hier.element.move with pLogOutput=1

Expected behavior
Info should be logged to tm1server.log without causing error

}bedrock.hier.element.create - Error while adding element to a dimension without hierarchies

Describe the bug
Process aborted while executing it on a dimension without hierarchies created
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to process }bedrock.hier.element.create
  2. Run on a dimension w/t hierarchies
  3. Result is process aborted
    Error: Prolog procedure line (194): Dimension "}Hierarchies_}APQ Parameters" not found

Expected behavior
Create an element in the hierarchy.

Version

  • OS: Windows Server 2012
  • TM1 Server Version: 11.4

Adding the process call in the Prolog tab

Hello,

What I find very helpful in my own technical / generic processes, is the ExecuteProcess call to that particular process, complete with all parameters and some typical default values. For instance, I add this in the Prolog tab of my process 'TECH_unwind dimension'. Hence, calling this process somewhere else can be done with a copy/paste from there:

If( 1 = 0 );
## call this custom process as, for instance:
ExecuteProcess( 'TECH_unwind dimension'
  , 'pDim', 'DIMENSION NAME'
  , 'pBelowConsolidation', 'CONSOLIDATED ELEMENT'
  , 'pDeleteConsolidations', 0
  , 'pOnlyDirectChildren', 0
);
## end of process call
EndIf;

Describe the solution you'd like
Would it be an idea to do this too for Bedrock processes ? I know that there processes can be called through other user interfaces and at the time of writing processes, the calls are often automated. However, people that use Bedrock without those UI's will need to do it manually. In that case I think that this feature can add value.

In fact, for my personal TI's, I have routines in place to filter out those custom calls in the Prolog tab such that I can also call processes in an automated way (selecting them from a menu and call with arguments is injected at run-time in the TI editor). It would be good it exists for Bedrock too. Some of my processes contain 15-20 parameters hence the need to find an easy solution here.

6 processes where a delimiter for text files can be chosen (f.e. }bedrock.cube.data.export)

Describe the bug

# Validate file delimiter & quote character
If( pDelimiter @= '' );
    sMessage = 'Data delimiter for file not specified.';
    nErrors = nErrors + 1;
    LogOutput( cMsgErrorLevel, Expand( cMsgErrorContent ) );

The Parameters section of the processes mentions that a comma is the default delimiter. Yet, as we can see in the code, if the supplied delimiter is empty, the process stops. The default comma is not applied. Either the text is wrong, either the code is wrong. I suspect that the code is wrong because the parameter question includes 'OPTIONAL' too, indicating that the default is a comma and the the processes should not abort.

It's probably down to personal preferences but I would like to replace this bit of code:

    # If length of pFieldDelim is exactly 3 chars and each of them is decimal digit, then the pFieldDelim is entered as ASCII code
    nValid = 0;
    If ( LONG(pFieldDelim) = cLenASCIICode );
      nChar = 1;
      While ( nChar <= cLenASCIICode );
        If( CODE( pFieldDelim, nChar ) >= CODE( '0', 1 ) & CODE( pFieldDelim, nChar ) <= CODE( '9', 1 ) );
          nValid = 1;
        Else;
          nValid = 0;
        EndIf;
        nChar = nChar + 1;
      End;
    EndIf;
    If ( nValid<>0 );
      pFieldDelim=CHAR(StringToNumber( pFieldDelim ));
    Else;
      pFieldDelim = SubSt( Trim( pFieldDelim ), 1, 1 );
    EndIf;

by:

    nValid = 0;
    If ( LONG(pFieldDelim) = cLenASCIICode );
      nChar = 1;
      While ( nChar <= cLenASCIICode );
        If( SCAN( SubSt( pFieldDelim, nChar, 1 ), '0123456789' ) > 0 );
          nValid = 1;
        Else;
          nValid = 0;
          Break;
        EndIf;
        nChar = nChar + 1;
      End;
    EndIf;
    If ( nValid=1 );
      pFieldDelim=CHAR(StringToNumber( pFieldDelim ));
    Else;
      pFieldDelim = SubSt( pFieldDelim, 1, 1 );
    EndIf;

This means 3 changes:

  • using the Scan function towards '0123456789'
  • the Break function stops a loop before the end. Every cycle counts :-)
  • the Trim in pFieldDelim = SubSt( Trim( pFieldDelim ), 1, 1 ); is superfluous, given earlier code

Bedrock.Dim.AllElements.Delete

I passed in dim name, pEle is hardcoded to '', pDelim is hardcoded to blank. It calls }bedrock.hier.element.delete. No elements were deleted from my dimension but it said process successful. I tried running the hidden process, passing in my dimension name, i tried both '' and blank for pEle (to delete all elements), left pHier blank and delimiter set to '&'. Both time it says process completed successfully but no elements are deleted from my dimension.

}bedrock.dim.import errors when the alias change element

Describe the bug

If the alias value for an element changes over time the process will report an ambiguous element and the process will error.

To Reproduce

Steps to reproduce the behaviour:

  1. Clone a dimension with an alias using }bedrock.dim.export and import using }bedrock.dim.import.
  2. In the source dimension change the alias from one element to another.
  3. Clone a dimension with an alias using }bedrock.dim.export and import using }bedrock.dim.import. The }bedrock.dim.import process will fail.

Expected behaviour

}bedrock.dim.import should detect that the alias value to be loaded will be ambiguous. The process should remove the offending alias value from the target dimension. Then load the alias value against the new element

Screenshots
[TM1ProcessError_20191018190438_87225808_}bedrock.hier.import.log

Version

  • PA 2.0.9

Additional context

Dimension clone does not copy rule calculated attributes

Describe the bug
Cloning a dimension with attributes doesn't copy the rule calculated attributes to the target dimension

To Reproduce
Steps to reproduce the behavior:

  1. Setup a dimension with a rule calculated attribute
  2. Clone the dimension using the }bedrock.dim.clone TI
  3. See that the rule calculated attribute wasn't copied.

Expected behavior
Line https://github.com/cubewise-code/bedrock/blob/master/main/%7Dbedrock.dim.clone.pro#L298 should be If( CellIsUpdateable( sAttrTragetDim, vEle, sAttrName ) = 1 );

Version

  • OS: Win 2012 R2
  • TM1 Server Version: 11.5

Bedrock.Dim.Clone

When running this process i get an error that the wrong type of parameter is passed in for pHier. It is hardcoded to a '1' and is expecting a string. Also, should be blank or star i think? Not sure what the 1 is.

dimclone error

}bedrock.hier.unwind not unwinding components of the nominated consolidation

Describe the bug
When unwind from a consolidation, recursively. The direct components of the nominated consolidation were not being unwound. The ancestors of the nominated consolidation are being unwound.

To Reproduce
Steps to reproduce the behaviour:
Example
pDim = 'FIN OCoA' ;
pHier = ''
pConsol = 'Balance Sheet'
Recursive = 1
pDelim = '&'

Expected behavior
All the ancestors of the nominated consolidation including the components of the nominated consolidation should be unwound when recurcively

Screenshots
If applicable, add screenshots to help explain your problem.

Version
PA 2.0.9

Additional context
The problem was when assigning the attribute to the ancestors the process was not assigning the attribute to nominated consolidation, see line Prolog:148. In the metadata tab the process breaking the components for the ansestors of the consolidation, Metadata:26. Because the nominated consolidation was not identified in the prolog the components where not being processed.

In the prolog:148 I added a test to for the nominated consolidation.
If( ElementIsAncestor( pDim, pHier, pConsol, sElement ) = 1 % sElement @= pConsol);

}bedrock.hier.unwind.pro - Unwind consolidations outside parameter pConsol (when pRecursive = 1)

Describe the bug
When running a Recursive unwind with parameter pConsol, is the child consolidation(s) that is used in a parallel hierarchie is also unwind. Although we have specified the pConsol parameter.
This worked perfect in v3.

To Reproduce
Steps to reproduce the behavior:

  1. Use following TI to create the test Dimension
pLogOutput = 0 ;
pDim = 'UNWIND_EXAMPLE' ;
DIMENSIONDESTROY(pDim);
DIMENSIONCREATE(pDim);
ExecuteProcess( '}bedrock.hier.element.create', 'pLogOutput', pLogOutput,
	    	'pDim', pDim, 'pHier', '', 'pEle', 'C_TOP1 & C_TOP2 & C_TOP3 & C_TOP_DEMO & TOP1_1 & TOP1_2 & TOP2_1 & TOP2_2 & TOP3_1 & TOP3_1',
	    	'pEleType', 'C', 'pInsertionPoint', '',
	    	'pDelim', '&'
		);
DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP1','TOP1_1', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP1_1', 'A', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP1_1', 'B', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP1','TOP_CROSS', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP_CROSS', 'CROSS_A', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP_CROSS', 'CROSS_B', 1);

DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP1','TOP1_2', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP1_2', 'C', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP1_2', 'D', 1);

DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP2','TOP2_1', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP2','TOP2_2', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP2_1', 'E', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP2_1', 'F', 1);

DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP3','TOP3_1', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP3_1', 'G', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP3','TOP3_2', 1);
DIMENSIONELEMENTCOMPONENTADD(pDim,'TOP3_2', 'H', 1);

DIMENSIONELEMENTCOMPONENTADD(pDim,'C_TOP_DEMO','TOP_CROSS', -1);
DIMENSIONSORTORDER(pDim,'','','BYHIERARCHY','ASCENDING');
  1. Now when the TEST dimension is created, unwind the first 3 (level2) consolidations, using following TI:
pLogOutput = 0 ;
pDim = 'UNWIND_EXAMPLE' ;
 ExecuteProcess( '}bedrock.hier.unwind', 'pLogOutput', pLogOutput,
    	'pDim', pDim, 'pHier', '', 'pConsol', 'C_TOP1 & C_TOP2 & C_TOP3',
    	'pRecursive', 1, 'pDelim', '&'
	);
  1. Result is, that the 4th consolidation C_TOP_DEMO is also unwind from TOP_CROSS.

Expected behavior
In the above example, the consolidation C_TOP_DEMO should left untouched.

Version

  • OS: Windows Server 2016, Windows 10
  • TM1 Server Version: 11.5.00000.23 (PA 2.0.7)

}Bedrock.Hier.Element.Create

Describe the bug
No element is added when trying to add an N level element to a dimension. It says process completed but nothing is added

To Reproduce
Steps to reproduce the behavior:

  1. }bedrock.hier.element.create or Bedrock.Dim.Element.Create
  2. Run with parameters (pDim= Currency, pHier =i tried blank and *, pEle = USD, pEleType = N, pInsertionPoint = blank, pDelim = &
  3. Result is process completed successfully but no element is added

Expected behavior
A new element USD is available in currency dimension

Screenshots
If applicable, add screenshots to help explain your problem.

Version

  • OS: Windows Server 2016 standard
  • TM1 Server Version: 11.4

Additional context
Add any other context about the problem here.

}bedrock.hier.import dissociate elements that contain minus in principal name

Describe the bug
Elements that contained '-' are being dissociate on import.

To Reproduce
Steps to reproduce the behaviour:
Export to file a dimension that include elements with the principal name containing a '-' using }bedrock.hier.export.
Import the file using }bedrock.hier.import.
Compare the elements to the original dimension and you will find elements that have a '-' shorten in the new dimension.

Expected behaviour
For a new dimension, the target dimension should be the same as the source dimension

Screenshots
None

Version
PA 2.0.9

Additional context
I have fixed this issue by removing the scan function lines M:23 and D:18.
}bedrock.hier.import.zip

Bedrock.Dim.AllConsols.Delete

This process is hardcoded to pass in ' ' to pDelim of process }bedrock.hier.consol.delete which executes successfully but does not remove any consolidations. If i run from }bedrock.hier.consol.delete with pDelim as the default & and pTemp as 0 (instead of current default 1) then the process does as expected and deletes consolidated elements. There is no pTemp passed in from shell and delimiter is hardcoded to blank instead of &.

}bedrock.cube.view.create not compatible with ViewCreate in advance.

Describe the bug
In bedrock 3, cube.view.create can be called after viewcreate(). Yet in bedrock 4, }cube.view.create will throw an minor error after viewcreate().

Screenshots
Bedrock 3 runs successfully
image

Bedrock 4 runs with minor error
image

The error message
image

The error message
image

Without viewcreate() in advance, bedrock 4 runs successfully
image

cube.view.create if pSubN=1 then filter ignored and all dimensions set to all leaf subset

Describe the bug
in }bedrock.cube.view.create the logic for parameter pSubN is defective and if set to true will cause all dimensions to be set with a subset of all leaf elements not only the ones absent from pFilter which is the intended result.

To Reproduce

  1. Run }bedrock.cube.view.create with a given filter and pTemp=0 and pSubN=0. Look at the resulting view
  2. Run again with all parameters the same except pSubN=1
  3. Result is the filter is ignored and all dimensions have leaf subset assigned

Expected behavior
Only dimensions not in the filter should have all leaf element subset assigned.

ER: faster unwind with delete followed by insert

Is your feature request related to a problem? Please describe.
Especially for large dimensions it is faster to unwind consolidations by deleting and then inserting the C element rather than removing all children.

Describe the solution you'd like
Bedrock should use this method for performance reasons

DimensionElementDelete( sDim, sEle );
DimensionElementInsert( sDim, sNextEle , sEle , 'C' );

}bedrock.dim.clone not unwinding elements

Describe the bug
When calling }bedrock.dim.clone i noticed that the hierarchy is not unwinding and we are seeing

Process:}bedrock.hier.unwind ErrorMsg:No consolidated element specified.

in the error log.

It appears that while }bedrock.hier.unwind says pConsol is optional, if you don't specify anything it sets the error to 1 and then does a ProcessBreak in the prolog before it can get to the unwind.

}bedrock.dim.clone doesn't give you a way to pass pConsol to the unwind process so it can only pass a blank which leads you to the issue of the hierarchy not unwinding. If you set to 2 it will delete all elements which is not what I was going for.

}bedrock.dim.clone
Prolog line 103

    IF(pUnwind = 1 );
       ExecuteProcess('}bedrock.hier.unwind',
        'pLogOutput', pLogOutput,
        'pDim', pTgtDim,
        'pHier', pTgtDim,
        'pConsol', '',
        'pRecursive', 1
        );

}bedrock.hier.unwind
Prolog line 113

ElseIf( Trim( pConsol ) @= '' );
    nErrors = 1;
    sMessage = 'No consolidated element specified.';
    LogOutput( cMsgErrorLevel, Expand( cMsgErrorContent ) );
Endif;

Metadata line 8

## Check for errors in prolog ###
If( nErrors <> 0 );
  ProcessBreak;
EndIf;

To Reproduce
Steps to reproduce the behavior:

Run }bedrock.dim.clone with pUnwind set to 1

Expected behavior
I would still expect an unwind to occur when cloning a dimension. Possibly just default pConsol to '*' so it will get past this?

Screenshots
If applicable, add screenshots to help explain your problem.

Version
TM1 2.0.5 FP4

Additional context
Add any other context about the problem here.

}bedrock.cube.data.copy question

Describe what you did so far.
It's probably something very stupid, but I just don't see what I'm doing wrong here:

Cube: kh_sg with Dim:
kh_verf
kh_jahr
kh_perio
kh_versi
kh_waehr
kh_kons
kh_konz
kh_ges
kh_segme
kh_bgkto

ExecuteProcess('}bedrock.cube.data.copy',
'pLogOutput',1,
'pCube','kh_sg',
'pSrcView','',
'pTgtView','',
'pFilter','',
'pFilterParallel','',
'pParallelThreads',2,
'pEleMapping','kh_versi:V01->RY2019_4QOB_F',
'pMappingDelim','->',
'pDimDelim','&',
'pEleStartDelim','¦',
'pEleDelim','+',
'pFactor',1,
'pSuppressRules',1,
'pCumulate',0,
'pZeroTarget',1,
'pZeroSource',0,
'pTemp',1,
'pCubeLogging',0,
'pThreadMode',0);

7456 [1] ERROR 2019-05-21 15:35:57.611 TM1.TILogOutput Process:}bedrock.cube.data.copy ErrorMsg:An element start delimiter must follow a dimension name: -> (13)
7456 [1] ERROR 2019-05-21 15:35:57.611 TM1.TILogOutput Process:}bedrock.cube.data.copy ErrorMsg:Element: kh_versi:V01 does not exist in dimension kh_bgkto
7456 [1] ERROR 2019-05-21 15:35:57.611 TM1.TILogOutput Process:}bedrock.cube.data.copy ErrorMsg:the process incurred at least 1 error. Please see above lines in this file for more details.
7456 [1] ERROR 2019-05-21 15:35:57.611 TM1.Process Process "}bedrock.cube.data.copy": finished with ProcessBreak

Describe what's not working the way you expect.
Didn't get the expected result? Describe:

  1. I don't understand what I'm doing wrong wrt MSG:
    ErrorMsg:An element start delimiter must follow a dimension name: -> (13)
  2. Both V01->RY2019_4QOB_F are elements from dim kh_versi
    MSG: rrorMsg:Element: kh_versi:V01 does not exist in dimension kh_bgkto

Version

  • OS: Windows Server 2012 R2
  • TM1 Server Version: PAL 2.0.7

}bedrock.hier.create.fromsubset fails if you are trying to copy a C element to a new hierarchy

Describe the bug
Trying to create a new hierarchy using a rollup fails. This happens when the process tries to insert a N element which already exists as a C element in a different hierarchy.

Is there any reason why we insert all elements as N into the target hierarchy? Line number here: https://github.com/cubewise-code/bedrock/blob/master/main/%7Dbedrock.hier.create.fromsubset.pro#L250

To Reproduce
Steps to reproduce the behavior:

  1. Try to create a new hierarchy based on the T Year-Week dimension
  2. Run the TI: }bedrock.hier.create.fromrollup and select the rollup element as "Group YTG" as an example
  3. See the error.

Expected behavior
Copying a rollup to a new hierarchy should not fail

Screenshots
N/A

Version

  • OS: Win 2012 R2
  • TM1 Server Version: 11.5.0.23

Additional context
N/A

hier.emptyconsols.delete should support list & wildcard for pDim & pHier params

Is your feature request related to a problem? Please describe.
Somehow support for list & wildcards has been missed in this process.

Describe the solution you'd like
For consistency with the rest of the library functionality pDim & pHier params shoudl support list & wildcard and there needs to be a pDelim parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.