Artifact Stack Commands

Dodeca Shell supports the notion of an "artifact stack". The artifact stack is a list of artifact keys (a combination of the artifact ID, category, and version) in a given tenant. The list can be modified by various commands. It is used to build up a list of particular artifacts and then perform some action on them.

For example, you may want to use Dodeca Shell to help facilitate the migration of certain views and their dependencies from one environemnt to another. You could use the view-dependencies command to generate a list of dependencies:

dshell/SAMPLE:>view-dependencies IncStmt VIEW

By default, the view-dependencies command will just output the hierarchy of dependencies that it detects:

IncStmt/VIEW/1
has Essbase connection Sample.Basic/ESSBASE_CONNECTION/1
has selector 4_Market/SELECTOR/1
has selector 3_Product/SELECTOR/1
has selector 5_Scenario/SELECTOR/1
has selector list Market_Tree_AutoOpen/SELECTOR_LIST/1
	has The selector that a selector list depends on 4_Market/SELECTOR/1
has selector list Product_Tree_AutoOpen/SELECTOR_LIST/1
	has The selector that a selector list depends on 3_Product/SELECTOR/1
has selector list Scenario_Combo/SELECTOR_LIST/1
	has The selector that a selector list depends on 5_Scenario/SELECTOR/1
has mergeable toolbar View Main /TOOLBARS_CONFIGURATION/1
has view toolbar Essbase View Standard Limited/TOOLBARS_CONFIGURATION/1
has Excel template IncStmt/GENERAL/1

However, the view-dependencies command accepts a --stack parameter that tells it to add the found dependencies to the artifact stack that is kept in memory during the Dodeca Shell session.

Notice that the stack is empty at first:

dshell/SAMPLE:>view-stack
dshell/SAMPLE:>

Then run the dependency command again, but adding the new stack parameter:

dshell/SAMPLE:>view-dependencies IncStmt VIEW --stack

Now when we view the stack, we’ll see all of the dependencies of the view added:

dshell/SAMPLE:>view-stack
Sample.Basic/ESSBASE_CONNECTION/1
IncStmt/GENERAL/1
3_Product/SELECTOR/1
4_Market/SELECTOR/1
5_Scenario/SELECTOR/1
Market_Tree_AutoOpen/SELECTOR_LIST/1
Product_Tree_AutoOpen/SELECTOR_LIST/1
Scenario_Combo/SELECTOR_LIST/1
Essbase View Standard Limited/TOOLBARS_CONFIGURATION/1
View Main /TOOLBARS_CONFIGURATION/1
IncStmt/VIEW/1

Remove an item from the artifact stack

You may want to remove certain items from the stack. You can use the stack-remove command. For example, perhaps you want to get all of the dependencies of the Income Statement view in order to export to another environment, but you may want to omit the Essbase connection that it’s dependent on. You can use the stack-remove command to specify an item to remove:

dshell/SAMPLE:>stack-remove Sample.Basic ESSBASE_CONNECTION 1

The stack after:

dshell/SAMPLE:>view-stack
IncStmt/GENERAL/1
3_Product/SELECTOR/1
4_Market/SELECTOR/1
5_Scenario/SELECTOR/1
Market_Tree_AutoOpen/SELECTOR_LIST/1
Product_Tree_AutoOpen/SELECTOR_LIST/1
Scenario_Combo/SELECTOR_LIST/1
Essbase View Standard Limited/TOOLBARS_CONFIGURATION/1
View Main /TOOLBARS_CONFIGURATION/1
IncStmt/VIEW/1

Add an item to the stack

Generally you will use other commands that support the artifact stack in order to add their output to the stack, but you can also simply add an item manually using the stack-add command, such as the following:

dshell/SAMPLE:>stack-add Sample.Basic ESSBASE_CONNECTION 1

After:

dshell/SAMPLE:>view-stack
Sample.Basic/ESSBASE_CONNECTION/1
IncStmt/GENERAL/1
3_Product/SELECTOR/1
4_Market/SELECTOR/1
5_Scenario/SELECTOR/1
Market_Tree_AutoOpen/SELECTOR_LIST/1
Product_Tree_AutoOpen/SELECTOR_LIST/1
Scenario_Combo/SELECTOR_LIST/1
Essbase View Standard Limited/TOOLBARS_CONFIGURATION/1
View Main /TOOLBARS_CONFIGURATION/1
IncStmt/VIEW/1