Dimension

A highly optimized class for fast dimensional hierarchy operations

analyze.dimension.add_alias(project_id, name, alias)

Adds a new alias

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • alias (str) – Alias unique ID

Returns

None

analyze.dimension.add_alt_hierarchy(project_id, name, hierarchy)

Creates a new alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchy (str) – Alternate hierarchy key

Returns

None

analyze.dimension.add_dimension(project_id, duid, name)

Creates a new dimension

Parameters
  • project_id (str) – Unique project identifier

  • duid (str) – Dimension key

  • name (str) – Dimension name

Returns

None

analyze.dimension.add_label(project_id, dimension_id, label, branch='master')

Sets a label on a dimension

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • label (str) – The label unique name

  • branch (str) – Project branch

Returns

None

analyze.dimension.add_mapping(project_id, name, table, column)

Adds a new table column mapping

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Dimension unique ID

  • table (str) – Table name

  • column (str) – Column name

Returns

None

analyze.dimension.add_node(project_id, name, parent, child, consolidation='+', hierarchy='main', before=None, after=None)

Adds an existing main hierarchy node to the specified hierarchy both leaves and folders can be added to the hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – parent node key

  • child (str) – child node key

  • consolidation (str) – Consolidation Type (+, -, or ~)

  • hierarchy (str) – Hierarchy unique ID

  • before (str) – node to insert before

  • after (str) – node to insert after

Returns

None

analyze.dimension.add_nodes(project_id, name, parent, children, consolidation='+', hierarchy='main', before=None, after=None)

Adds an existing main hierarchy nodes to the specified hierarchy both leaves and folders can be added to the hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – parent node key

  • children (list) – child node keys

  • consolidation (str) – Consolidation Type (+, -, or ~)

  • hierarchy (str) – Hierarchy unique ID

  • before (str) – node to insert before

  • after (str) – node to insert after

Returns

None

analyze.dimension.add_path(project_id, dimension_id, path, branch='master')

Adds a dimension reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • path (str) – Object rollup path using unix style forward slashes branch (str): Project branch

Returns

None

analyze.dimension.add_paths(project_id, additions, branch='master')

Adds multiple dimension reference paths in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • additions (list) – List of moves, containing: dimension_id (str): Unique dimension identifier to_path (str): New path

  • branch (str) – Project branch

Returns

None

analyze.dimension.add_property(project_id, name, property, type=None, config=None)

Adds a new property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • property (str) – Property unique ID

  • type (str) – property type for data editor

  • config (dict) – property config for a type

Returns

None

analyze.dimension.add_value(project_id, name, value)

Adds a new value

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • value (str) – Value unique ID

Returns

None

analyze.dimension.ascend(project_id, name, node, hierarchy='main', alias=None)

Ascends hierarchy from node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Node alias name

  • hierarchy (str) – Hierarchy unique ID

  • alias (str) – Alias type

Returns

dict

analyze.dimension.backup(project_id, name)

Backup dimension in project

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Dimension key

Returns

Dimension persisted in YAML format

Return type

yaml (str)

analyze.dimension.backup_all(project_id)

Backup dimension in project

Parameters

project_id (str) – Unique project identifier

Returns

Dimensions persisted in YAML format

Return type

yaml (str)

analyze.dimension.backup_all_to_document(project_id, document_account, path, file_name)

Backup dimensions in project to document store

Parameters
  • project_id (str) – Unique project identifier

  • document_account (str) – The ID of the document account to upload to

  • path (str) – The path in document to upload to

  • file_name (str) – The name to upload the result file as

Returns

None

analyze.dimension.backup_to_document(project_id, name, document_account, path, file_name)

Backup dimension in project to document store

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Dimension key

  • document_account (str) – The ID of the document account to upload to

  • path (str) – The path in document to upload to

  • file_name (str) – The name to upload the result file as

Returns

None

analyze.dimension.clear(project_id, name)

Clears the main and alternate hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

None

analyze.dimension.clear_alt_hierarchy(auth_id, project_id, name, hierarchy)

Clears an alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchy (str) – Alternate hierarchy unique ID

Returns

None

analyze.dimension.copy_dimension(project_id, src, dest, dest_project_id=None)

Copies a dimension

Parameters
  • project_id (str) – Unique project identifier

  • src (str) – Current dimension unique ID

  • dest (str) – New dimension unique ID

  • dest_project_id (str) – Analyze project_id used as key to saved hierarchy in Redis

Returns

None

analyze.dimension.copy_directory(project_id, from_path, to_path, branch='master')

Copies a folder and all paths in the hierarchy but does not duplicate referenced objects

Parameters
  • project_id (str) – Unique project identifier

  • from_path (str) – Original directory path

  • to_path (str) – Destination directory path

  • branch (str) – Project branch

Returns

None

analyze.dimension.create(project_id, path, name, memo, branch='master')

Creates a Dimension

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Path to place the dimension in the hierarchy

  • name (str) – The object name

  • memo (str) – The object description

  • branch (str) – Project branch

Returns

dict with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.dimension.create_directory(project_id, path, branch='master')

Creates a folder in the dimension hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Path to directory

  • branch (str) – Project branch

Returns

None

analyze.dimension.create_directory_paths(project_id, path, branch='master')

Creates all necessary folders in the path in the dimension hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Path to directory

  • branch (str) – Project branch

Returns

None

analyze.dimension.delete(project_id, dimension_id, branch='master')

Deletes a dimension

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • branch (str) – Project branch

Returns

None

analyze.dimension.delete_alias(project_id, name, alias)

Delete an alias

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • alias (str) – Alias unique ID

Returns

None

analyze.dimension.delete_alt_hierarchy(project_id, name, hierarchy)

Deletes an alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchy (str) – Alternate hierarchy unique ID

Returns

None

analyze.dimension.delete_dimension(project_id, name)

Deletes a dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Dimension key

Returns

None

analyze.dimension.delete_directory(project_id, path, branch='master')

Deletes a folder and removes path from all objects in that directory

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Path to directory

  • branch (str) – Project branch

Returns

None

analyze.dimension.delete_mapping(project_id, table, column)

Deletes a table column mapping

Parameters
  • project_id (str) – Unique project identifier

  • table (str) – Table name

  • column (str) – Column name

Returns

None

analyze.dimension.delete_node(project_id, name, parent, child, hierarchy='main')

Deletes the node and removes all aliases and properties

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – parent node key

  • child (str) – child node key

  • hierarchy (str) – Hierarchy unique ID

Returns

None

analyze.dimension.delete_node_alias(project_id, name, node, alias)

Creates a new node alias

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • alias (str) – Alias ID

Returns

None

analyze.dimension.delete_node_property(project_id, name, node, property)

Delete a property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • property (str) – Property type

Returns

None

analyze.dimension.delete_node_value(project_id, name, node, value)

Deletes a node value

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • value (str) – Value name

Returns

None

analyze.dimension.delete_nodes(project_id, name, parent, child, hierarchy='main')

Deletes the nodes and removes all aliases and properties

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – parent node key

  • children (str) – child node key

  • hierarchy (str) – Hierarchy unique ID

Returns

None

analyze.dimension.delete_property(project_id, name, property)

Delete an property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • property (str) – Property unique ID

Returns

None

analyze.dimension.delete_value(project_id, name, value)

Delete an value

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • value (str) – Value unique ID

Returns

None

analyze.dimension.descend(project_id, name, node, hierarchy='main', alias=None)

Descends hierarchy from node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Node alias name

  • hierarchy (str) – Hierarchy unique ID

  • alias (str) – Alias type

Returns

dict

analyze.dimension.dimension(project_id, dimension_id, branch='master', keys=None))

Provides detailed dimension information

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • branch (str) – Project branch

  • keys (list) – List of keys to return. Defaults to all.

Returns

dict with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.dimension.dimensions(project_id, branch='master', id_filter=None, sort=None, keys=None, member_details=False)

Returns the list of dimensions in the specified project

Parameters
  • project_id (str) – Unique project identifier

  • branch (str, optional) – Project branch

  • id_filter (list, optional) – List of identifiers to which to limit the results. If None or empty, don’t filter

  • sort (list, optional) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list, optional) – List of keys to return. Defaults to all.

  • member_details (bool, optional) – If True then returns member info relating to updated_by

Returns

result list of dicts with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

If member_details is set to True, the dict will also contain:
  • updated_by_full_name (str): The User Name of the user that last updated the dimension

  • updated_by_user_id (int): The id of the user that last updated the dimension

  • updated_by_gravatar_hash (str): Unique hash to pull gravatar for the user.

Return type

list

analyze.dimension.dimensions_from_label(project_id, label, branch='master', sort=None, keys=None)

Provides list of dimensions for based on set of labels. Uses AND condition.

Parameters
  • project_id (str) – Unique project identifier

  • label (str) – label name

  • branch (str) – Project branch

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

result list of dicts with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.dimension.dimensions_from_path(project_id, path, branch='master', sort=None, keys=None)

Provides list of dimensions based on a path fragment. Path fragment can be to parent level.

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Object rollup path using unix style forward slashes

  • branch (str) – Project branch

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

result list of dicts with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension name

  • memo (str): Description of dimension

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

Return type

list

analyze.dimension.get_aliases(project_id, name)

Returns current alias names

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Set of aliases types

Return type

set

analyze.dimension.get_aliases_dataframe(project_id, name)

Get aliases as a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str

Returns

Datafame with alias nodes and values

Return type

df (Dataframe)

analyze.dimension.get_all_aliases(auth_id, project_id, name)

get_all_aliases(project_id, name Return all aliases in dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Dict of dicts by alias name/node/alias

Return type

dict

analyze.dimension.get_all_attributes(auth_id, project_id, name))

Returns all attributes in dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Dict of dicts by hierarchy/node/parent atrribute

Return type

dict

analyze.dimension.get_all_inherited_attributes(project_id, name)

Returns all attributes including inherited attributes in dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Dict of dicts - node (str): Unique hierarchy node identifier - attribute (str): Attribute - hierarchy (str): Hierarchy unique ID - inherited (bool): Inherited value returned - ancestor (str): Node holding inherited attribute

Return type

dict

analyze.dimension.get_all_inherited_properties(project_id, name, hierarchy=None)

Returns all properties including inherited properties in dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchy (str) – Hierarchy unique ID or None returns all hierarchies

Returns

Dict of dicts by hierarchy
  • node (str): Unique hierarchy node identifier

  • value (str): Value or None

  • inherited (bool): Inherited value returned

  • ancestor (str): Node holding inherited value

Return type

dict

analyze.dimension.get_all_properties(project_id, name, hierarchy=None)

Returns all properties in dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • Returns – dict: Dict of dicts by property name/node/property

analyze.dimension.get_all_values(project_id, name)

Return all values in dimension

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Dict of dicts by value name/node/value

Return type

dict

analyze.dimension.get_alt_hierarchies(project_id, name)

Returns current alt hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

List of alternate hierarchies

Return type

list

analyze.dimension.get_ancestor(project_id, name, node, level, hierarchy='main')

Traverses up the hierarchy to find the specified ancestor

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • level (int) – Number of generations to go back for ancenstor

  • hierarchy (str) – Hierarchy unique ID

Returns

Ancestor node unique identifier

Return type

str

analyze.dimension.get_ancestors(project_id, name, node, hierarchy='main')

Returns an ordered list of the node lineage objects

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of nodes

Return type

list

analyze.dimension.get_attributes_dataframe(project_id, name)

Get attributes as a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str

Returns

Datafame with attribute nodes and values

Return type

df (Dataframe)

analyze.dimension.get_bottom(project_id, name, node, hierarchy='main')

Returns the bottom node of the children in the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Unique node identifier

Return type

str

analyze.dimension.get_children(project_id, name, node, hierarchy='main')

Finds the children of the node within the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of child node unique identifiers

Return type

list

analyze.dimension.get_children_count(project_id, name, node, hierarchy='main')

Finds number of children of the node within the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Count of child node unique identifiers

Return type

int

analyze.dimension.get_children_for_ui(project_id, name, node_id, hierarchy='main')

Finds the children of the node within the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of child node unique identifiers

Return type

list

analyze.dimension.get_children_with_details(project_id, name, node, hierarchy='main')

Finds the children of the node within the specified hierarchy and returns additonal details

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of dicts with child node unique identifiers/consolidations/leaf

Return type

list

analyze.dimension.get_consolidation(project_id, name, node, hierarchy='main')

Gets the consolidation type of a node within the specified alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent node ID

  • child (str) – Child node ID

  • hierarchy (str) – Hierarchy unique ID

Returns

Consolidation type of node (‘~’, ‘+’, ‘-‘, ‘|’, ‘&’)

~ = None + = Add - = Subtract | = OR & = AND

Return type

str

analyze.dimension.get_descendents(project_id, name, node, hierarchy='main')

Finds all descendants of the node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of descendent node unique identifiers

Return type

list

analyze.dimension.get_descendents_at_level(project_id, name, node, level, hierarchy='main')

Finds all node types of a branch at the specified level

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • level (int) – Number of generations to descend for leaves

  • hierarchy (str) – Hierarchy unique ID

Returns

List of node unique identifiers at the specified level

Return type

list

analyze.dimension.get_difference(project_id, name, hierarchies)

Difference of nodes between main and alternate hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchies (list) – list of alternate hierarchies to use

Returns

Difference of all nodes across hierarchies

Return type

list

analyze.dimension.get_dimension_tables(project_id, name)

Return tables using the dimension in a column mapping

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Dimension unique ID

Returns

Dict of tables & columns

Return type

dict

analyze.dimension.get_dimensions(project_id)

Gets dimensions

Parameters

project_id (str) – Unique project identifier

Returns

Set of dimensions

Return type

set

analyze.dimension.get_down(project_id, name, node, hierarchy='main')

Returns the next node of the children in the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Unique node identifier

Return type

str

analyze.dimension.get_generation(project_id, name, node, hierarchy='main')

Returns the generation of the node in the main hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Generation of node

Return type

int

analyze.dimension.get_grandparent(project_id, name, node, hierarchy='main')

Returns the grandparent of the node within the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Grandparent node

Return type

str

analyze.dimension.get_hierarchy(project_id, name, node='!!root!!', hierarchy='main', alias=None, level=None, leaf_only=False)

Returns the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

  • alias (str) – Alias unique ID

  • level (int) – Level to descend to or None for all

  • leaf_only (bool) – Only return leaf nodes no parents

Returns

Hierarchy from specified node with node details

Return type

dict

analyze.dimension.get_hierarchy_dataframe(project_id, name, hierarchy=MAIN)

Get attributes as a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str :param hierarchy: Hierarchy unique ID :type hierarchy: str

Returns

Datafame with hierarchy data

Return type

df (Dataframe)

analyze.dimension.get_intersection(project_id, name, main_node, alt_nodes)

Intersection of nodes between main and alternate hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchies (list) – list of alternate hierarchies to use

Returns

Intersection of all nodes across hierarchies

Return type

list

analyze.dimension.get_leaves(project_id, name, node, hierarchy='main')

Finds the leaves below a node within a specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of leaf level node objects

Return type

list

analyze.dimension.get_leaves_at_level(project_id, name, node, level, hierarchy='main')

Finds leaves of a branch at the specified level

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • level (int) – Number of generations to descend for leaves

  • hierarchy (str) – Hierarchy unique ID

Returns

List of leaf level node objects

Return type

list

analyze.dimension.get_node_alias(project_id, name, node, alias)

Gets an alias for the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • alias (str) – Alias type

Returns

Alias of node

Return type

str

analyze.dimension.get_node_count(project_id, name, hierarchy='main')

Provides number of hierarchy nodes

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchy (str) – Hierarchy unique ID

Returns

Node count

Return type

int

analyze.dimension.get_node_details(project_id, name, node, hierarchy='main')

Returns detailed information about a node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Dict with child node unique identifiers/consolidations/leaf/aliases etc.

Return type

dict

analyze.dimension.get_node_from_alias(auth_id, project_id, name, alias, value)

get_nodes_from_alias(project_id, name, alias, value) Finds the node object using the alias

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • alias (str) – Alias type

  • value (str) – Alias of node

Returns

Node name

Return type

str

analyze.dimension.get_node_property(project_id, name, node, property, inherit=False, hierarchy='main')

Gets a property for the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • property (str) – Property type

  • inherit (bool) – Find inherited property

  • hierarchy (str) – Hierarchy unique ID

Returns

  • node (str): Unique hierarchy node identifier

  • value (str): Value or None

  • inherited (bool): Inherited value returned

  • ancestor (str): Node holding inherited value

Return type

dict

analyze.dimension.get_node_value(project_id, name, node, value)

Get value for the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • value (str) – Value name

Returns

Value of node for specified value name

Return type

float

analyze.dimension.get_nodes_from_property(project_id, name, property, value)

Finds the node objects using the property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • property (str) – Property type

  • value (str) – Property value

Returns

Node names

Return type

list

analyze.dimension.get_nodes_from_value(project_id, name, value, number)

Finds the node objects using the value

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • value (str) – Property type

  • number (float) – Property value

Returns

Node names

Return type

list

analyze.dimension.get_parent(project_id, name, node, hierarchy='main')

Gets the node’s parent within the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Parent node

Return type

str

analyze.dimension.get_parents(project_id, name, node)

Finds all the hierarchy parents of the node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

Returns

List of hierarchies list: List of alt parent objects

Return type

list

analyze.dimension.get_properties(project_id, name)

Displays the list of current properties

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Set of current property types

Return type

set

analyze.dimension.get_properties_dataframe(project_id, name)

Get properties as a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str

Returns

Datafame with property nodes and values

Return type

df (Dataframe)

analyze.dimension.get_properties_with_config(project_id, name)

Returns a list of current properties and their configurations, each as a dict

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

List of property dicts

Return type

list

analyze.dimension.get_property_config(auth_id, project_id, name, property)

Get the config for the property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • property (str) – Property unique ID

Returns

type: JSON config

Return type

dict

analyze.dimension.get_siblings(project_id, name, node, hierarchy='main')

Finds the siblings of the node within the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

List of sibling node objects including current node

Return type

list

analyze.dimension.get_table_dimensions(project_id, table)

Return dimensions used by a table in column mappings

Parameters
  • project_id (str) – Unique project identifier

  • table (str) – Table name

Returns

Dict of columns to dimensions

Return type

dict

analyze.dimension.get_top(project_id, name, node, hierarchy='main')

Returns the top node of the children in the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Unique node identifier

Return type

str

analyze.dimension.get_union(auth_id, project_id, name, hierarchies)

get_intersection(project_id, name, main_node, alt_nodes) Union of nodes between main and alternate hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchies (list) – list of alternate hierarchies to use

Returns

Union of all nodes across hierarchies

Return type

list

analyze.dimension.get_up(project_id, name, node, hierarchy='main')

Returns the previous node of the children in the specified hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

Unique node identifier

Return type

str

analyze.dimension.get_values(project_id, name)

Displays the list of current values

Parameters
  • project_id (str) – Unique value identifier

  • name (str) – Unique name for hierarchy dimension

Returns

Set of current value types

Return type

set

analyze.dimension.get_values_dataframe(project_id, name)

Get values as a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str

Returns

Datafame with values nodes and values

Return type

df (Dataframe)

analyze.dimension.ids_from_path(project_id, path, branch='master')

Provides the canonical id for the from a provided path

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Object rollup path using unix style forward slashes

  • branch (str) – Project branch

Returns

id (str): Dimension unique identifier

Return type

list

analyze.dimension.is_alias(project_id, name, alias)

Checks alias exists

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • alias (str) – Alias unique ID

Returns

Does the alias exist

Return type

bool

analyze.dimension.is_below_group(project_id, name, node, group_id, hierarchy='main')

Checks if a node is contained in a group

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • group_id (str) – Group node unique identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

True if node is contained in group

Return type

bool

analyze.dimension.is_bottom(project_id, name, parent, child, hierarchy='main')

Check if node is the bottom child of the parent node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent node ID

  • child (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

True if the child descends from the parent

Return type

bool

analyze.dimension.is_child_of(project_id, name, node, parent, hierarchy='main')

Check if node is a child of the parent node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • parent (str) – Parent node ID

  • hierarchy (str) – Hierarchy unique ID

Returns

True if the child descends from the parent

Return type

bool

analyze.dimension.is_descendent_of(project_id, name, node, ancestor_id, hierarchy='main')

Checks if node is a decendant of an ancestor node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • ancestor_id (str) – Node ID of ancestor

  • hierarchy (str) – Hierarchy unique ID

Returns

True if the node is an ancestor

Return type

bool

analyze.dimension.is_dimension(project_id, name)

Checks that a dimension exists

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Dimension unique ID

Returns

True if the dimension exists

Return type

bool

analyze.dimension.is_hierarchy(project_id, name, hierarchy)

Checks hierarchy exists

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • hierarchy (str) – Alternate hierarchy unique ID

Returns

True if the hierarchy exists

Return type

bool

analyze.dimension.is_parent_of(project_id, name, parent, child, hierarchy='main')

Checks if node is a parent of the child node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Unique hierarchy node identifier

  • child (str) – Child node unique identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

True if the child descends from parent

Return type

bool

analyze.dimension.is_property(project_id, name, property)

Checks property exists

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • property (str) – Property unique ID

Returns

Does the property exist

Return type

bool

analyze.dimension.is_top(project_id, name, parent, child, hierarchy='main')

Check if node is the top child of the parent node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent node ID

  • child (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

True if the child descends from the parent

Return type

bool

analyze.dimension.is_value(project_id, name, value)

Checks value exists

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • value (str) – Value unique ID

Returns

Does the value exist

Return type

bool

analyze.dimension.labels(project_id, dimension_id, branch='master')

Provides a list of labels for the dimension

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • branch (str) – Project branch

Returns

list of labels associated with Dimension

Return type

list

analyze.dimension.load_aliases_from_dataframe(project_id, name, df, nodes, names, values)

Bulk loads aliases from a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str :param df: Datafame with P/C nodes :type df: Dataframe :param nodes: Column with node names :type nodes: str :param names: Column with alias names :type names: str :param values: Column with alias values :type values: str

Returns

None

analyze.dimension.load_from_table_flat(project_id, name, table, columns, top=None, consolidations=None, consol_default='+', hierarchy='main', property_columns=None, value_columns=None)

Bulk loads a dimension from an Analyze table

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • table (str) – Name of table to query

  • top (str) – Top level name to start dimension hierarchy

  • columns (list) – Column names with flattened hierarchy

  • consolidations (str) – Column with consolidations nodes

  • consol_default (str) – consolidation type +, -, or ~

  • hierarchy (str) – alt hierarchy key

  • property_columns (list) – columns which contain properties for the child

  • value_columns (list) – columns which contain values for the child

Returns

None

analyze.dimension.load_from_table_pc(project_id, name, table, parents, children, consolidations=None, consol_default='+', hierarchy='main', property_columns=None, value_columns=None)

Bulk loads a dimension from an Analyze table

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • table (str) – Name of table to query

  • parents (str) – Column with parent nodes

  • children (str) – Column with children nodes

  • consolidations (str) – Column with consolidations nodes

  • consol_default (str) – consolidation type +, -, or ~

  • hierarchy (str) – alt hierarchy key

  • property_columns (list) – columns which contain properties for the child

  • value_columns (list) – columns which contain values for the child

Returns

None

analyze.dimension.load_hierarchy_from_dataframe(auth_id, project_id, name, df, parents, children, consolidations=None, consol_default='+', hierarchy='main', clear=False)

load_hierarchy_from_dataframe(project_id, df, parents, children, consolidations=None, consol_default=’+’, hierarchy=’main, clear=False’) Bulk loads a hierarchy from a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str :param df: Unique name for hierarchy dimension :type df: str :param parents: Column with parent nodes :type parents: str :param children: Column with children nodes :type children: str :param consolidations: Column with consolidations nodes :type consolidations: str :param consol_default: consolidation type ‘~’, ‘+’, ‘-‘, ‘|’, ‘&’ :type consol_default: str :param hierarchy: alt hierarchy key or column in dataframe :type hierarchy: str :param clear: Clear the hierarchy before loading :type clear: bool

Returns

  • hierarchy (str): hierarchy ID

  • parent (str): parent node ID

  • child (str): child node ID

  • consolidation (str): consolidation type

  • status (bool): Success True or False

  • code (int): Result code

  • message (str): Message string

Return type

dataframe

analyze.dimension.load_properties_from_dataframe(project_id, name, df, nodes, names, values)

Bulk loads properties from a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str :param df: Datafame with P/C nodes :type df: Dataframe :param nodes: Column with node names :type nodes: str :param names: Column with property names :type names: str :param values: Column with property values :type values: str

Returns

None

analyze.dimension.load_values_from_dataframe(project_id, name, df, nodes, names, values)

Bulk loads values from a Dataframe :param project_id: Unique project identifier :type project_id: str :param name: Unique name for hierarchy dimension :type name: str :param df: Datafame with P/C nodes :type df: Dataframe :param nodes: Column with node names :type nodes: str :param names: Column with property names :type names: str :param values: Column with property values :type values: str

Returns

None

analyze.dimension.lookup_by_full_path(project_id, path, branch='master')

Returns ID for path provided

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Object rollup path using unix style forward slashes

  • branch (str) – Project branch

Returns

Dimension unique identifier

Return type

str

analyze.dimension.lookup_by_name(project_id, name, branch='master')

Returns ID for path provided

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique dimension name

  • branch (str) – Project branch

Returns

Dimension unique identifier

Return type

str

analyze.dimension.move_directory(project_id, from_path, to_path, branch='master')

Updates a folder name in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • from_path (str) – Original directory path

  • to_path (str) – Destination directory path

  • branch (str) – Project branch

Returns

None

analyze.dimension.move_node(project_id, name, child, new_parent, hierarchy='main', before=None, after=None)

Moves an existing main hierarchy node to the specified hierarchy both leaves and folders can be added to the hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • child (str) – child node key

  • new_parent (str) – new parent node

  • hierarchy (str) – Hierarchy unique ID

  • before (str) – node to insert before

  • after (str) – node to insert after

Returns

New parent of node

Return type

str

analyze.dimension.move_nodes(project_id, name, moves, hierarchy='main', before=None, after=None)

Moves a set of hierarchy nodes to the specified hierarchy both leaves and folders can be added to the hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • moves (list) – list of children to move

  • new_parent (str) – new parent node key

  • hierarchy (str) – Hierarchy unique ID

  • before (str) – node to insert before

  • after (str) – node to insert after

Returns

New parent of node

Return type

str

analyze.dimension.move_path(project_id, dimension_id, from_path, to_path, branch='master')

Moves a dimension reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • from_path (str) – Original path

  • to_path (str) – Destination path

  • branch (str) – Project branch

Returns

None

analyze.dimension.move_paths(project_id, moves, branch='master')

Moves a dimension reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • moves (list) – List of moves, containing: dimension_id (str): Unique dimension identifier from_path (str): Original path to_path (str): Destination path

  • branch (str) – Project branch

Returns

None

analyze.dimension.node_exists(project_id, name, node)

Returns if the specified node exists else False

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

Returns

True if node exists

Return type

bool

analyze.dimension.node_in_hierarchy(project_id, name, node, hierarchy)

Returns True if specified node exists in hierarchy else False

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • hierarchy (str) – Hierarchy unique ID

Returns

True if node is in specified hierarchy

Return type

bool

analyze.dimension.paths(project_id, branch='master', path=None)

Provides a list of paths for all dimensions and folders

Parameters
  • project_id (str) – Unique project identifier

  • branch (str) – Project branch

  • path (str) – Initial path to search

Returns

List of dimension and directory paths

Return type

list

analyze.dimension.paths_from_id(project_id, dimension_id, branch='master')

Provides a list of paths associated with the canonical id

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • branch (str) – Project branch

Returns

List of paths that point to the dimension specified

Return type

list

analyze.dimension.reload(project_id, name)

Load nodes and hierarchies

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

Returns

None

analyze.dimension.remove_label(project_id, dimension_id, label, branch='master')

Removes a label on a dimension

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • label (str) – The label unique name

  • branch (str) – Project branch

Returns

None

analyze.dimension.remove_path(project_id, dimension_id, path, branch='master')

Removes a dimension reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • path (str) – Object rollup path using unix style forward slashes branch (str): Project branch

Returns

None

analyze.dimension.rename_alias(project_id, name, old, new)

Renames an alias

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • old (str) – Current alias unique ID

  • new (str) – New alias unique ID

Returns

None

analyze.dimension.rename_alt_hierarchy(project_id, name, old, new)

Renames an alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • old (str) – Current alternate hierarchy unique ID

  • new (str) – New alternate hierarchy unique ID

Returns

None

analyze.dimension.rename_dimension(project_id, old, new)

Renames a dimension

Parameters
  • project_id (str) – Unique project identifier

  • old (str) – Current dimension unique ID

  • new (str) – New dimension unique ID

Returns

None

analyze.dimension.rename_node(project_id, name, old, new)

Renames the node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • old (str) – Current node unique ID

  • new (str) – New node unique ID

Returns

None

analyze.dimension.rename_property(project_id, name, old, new)

Renames a property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • old (str) – Current property unique ID

  • new (str) – New property unique ID

Returns

None

analyze.dimension.rename_value(project_id, name, old, new)

Renames a value

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • old (str) – Current value unique ID

  • new (str) – New value unique ID

Returns

None

analyze.dimension.reorder_nodes(project_id, name, ancestor, children, hierarchy='main')

Reorders the nodes under the ancestor

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • ancestor (str) – Current node unique ID

  • children (list) – Node ids in new order

  • hierarchy (str) – Hierarchy unique ID

Returns

None

analyze.dimension.restore(project_id, data)

Restore dimension in project

Parameters
  • project_id (str) – Unique project identifier

  • data (str) – Backup data in YAML format

Returns

None

analyze.dimension.restore_all(project_id, data)

Restore all dimensions in project

Parameters
  • project_id (str) – Unique project identifier

  • data (str) – Dimensions persisted in YAML format

Returns

None

analyze.dimension.restore_all_from_document(project_id, document_account, path, file_name)

Restore all nodes and hierarchies in project

Parameters
  • project_id (str) – Unique project identifier

  • document_account (str) – The ID of the document account to upload to

  • path (str) – The path in document to upload to

  • file_name (str) – The name to upload the result file as

Returns

None

analyze.dimension.restore_from_document(project_id, document_account, path, file_name)

Restore all nodes and hierarchies in project

Parameters
  • project_id (str) – Unique project identifier

  • document_account (str) – The ID of the document account to upload to

  • path (str) – The path in document to upload to

  • file_name (str) – The name to upload the result file as

Returns

None

analyze.dimension.search_by_label(project_id, text, criteria='contains', branch='master', sort=None, keys=None)

Returns list of dimensions that match the search criteria

Parameters
  • project_id (str) – Unique project identifier

  • text (str) – The search text to locate

  • criteria (str) – The search criteria (contains, exact, startswith, or endswith)

  • branch (str) – Project branch

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

result list of dicts with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.dimension.search_by_name_under_path(project_id, path='/', text='', criteria='contains', branch='master', sort=None, keys=None)

Provides list of dimensions under a given path

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Object rollup path using unix style forward slashes

  • text (str) – Dimension name fragment to search for

  • criteria (str) – The search criteria (contains, exact, startswith, or endswith)

  • branch (str) – Project branch

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

Returns

result list of dicts with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

Return type

list

analyze.dimension.set_consolidation(project_id, name, node, parent, consolidation='+', hierarchy='main')

Sets the consolidation type of a node within the specified alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent node ID

  • child (str) – Unique hierarchy node identifier

  • consolidation – Consolidation type (‘~’, ‘+’, ‘-‘, ‘|’, ‘&’) ~ = None + = Add - = Subtract | = OR & = AND

  • hierarchy (str) – Hierarchy unique ID

Returns

None

analyze.dimension.set_node_alias(project_id, name, node, alias, value)

Sets an alias for the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • alias (str) – Alias type

  • value (str) – Alias of node

Returns

None

analyze.dimension.set_node_property(project_id, name, node, property, value)

Sets a property for the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • property (str) – Property type

  • value (str) – Property value

Returns

None

set_node_value(project_id, name, node, value, value)

Sets value for the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

  • value (str) – Value name

  • number (float) – Value to set for value name

Returns

None

analyze.dimension.set_property_config(auth_id, project_id, name, property, type, config)

Set the config for the property

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • property (str) – Property unique ID

  • type (str) – Property type ID

  • config (str) – JSON config string

Returns

None

analyze.dimension.shift_down(project_id, name, parent, child, hierarchy='main')

Move the node below following node within the same generation If bottom within parent, it moves to the next parent below at the same generation as it’s parent (if there is one)

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent Node Key

  • child (str) – Child Node Key

  • hierarchy (str) – Alt Hierarchy Key

Returns

New parent node or None if cannot be moved

Return type

str

analyze.dimension.shift_left(project_id, name, parent, child, hierarchy='main')

Move the node one generation up (if possible)

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent Node Key

  • child (str) – Child Node Key

  • hierarchy (str) – Alt Hierarchy Key

Returns

New parent node or None if cannot be moved

Return type

str

analyze.dimension.shift_right(project_id, name, parent, child, hierarchy='main')

Move the node one generation down, looking upwards in the hierarchy for a suitable parent (if there is one)

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent Node Key

  • child (str) – Child Node Key

  • hierarchy (str) – Alt Hierarchy Key

Returns

New parent node or None if cannot be moved

Return type

str

analyze.dimension.shift_up(project_id, name, parent, child, hierarchy='main')

Move the node above prior node within the same generation If top within parent, it moves to the next parent above at the same generation as it’s parent (if there is one)

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • parent (str) – Parent Node Key

  • child (str) – Child Node Key

  • hierarchy (str) – Alt Hierarchy Key

Returns

New parent node or None if cannot be moved

Return type

str

analyze.dimension.sort_alt_hierarchy(project_id, name, hierarchy='main', branch='master', ordering=None, alpha=True)

Sort an alt hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique dimension identifier

  • hierarchy (str) – Name of hierarchy

  • branch (str) – Project branch

  • ordering (str) – DESC/desc to sort in descending order

  • alpha (bool) – True = sort alphanumerically (default) False = sort numerically

Returns

None

analyze.dimension.update(project_id, dimension_id, branch='master', **kwargs)

Updates a dimension

Parameters
  • project_id (str) – Unique project identifier

  • dimension_id (str) – Unique dimension identifier

  • branch (str) – Project branch

Kwargs:

name (str): The object name memo (str): The object description view_manager (bool): Dimension is visible to Manager roles if True view_explorer (bool): Dimension is visible to Explorer roles if True

Returns

result dict with the following properties
  • project_id (str): Unique project identifier

  • branch (str): Project branch

  • id (str): Unique dimension identifier

  • name (str): Dimension Name

  • memo (str): Description of dimension

  • view_manager (bool): Dimension is visible to Manager roles if True

  • view_explorer (bool): Dimension is visible to Explorer roles if True

  • paths (list): List of hierarchy paths that reference the dimension

  • labels (list): List of labels assigned to dimension

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.dimension.validate_uuid4(uuid_string)
analyze.dimension.view_explorer(project_id, dimension_ids, allowed=True, branch='master')

Sets View Explorer flag

Parameters
  • project_id (str) – Unique project identifier

  • dimension_ids (str) – Unique dimension identifier or list of unique dimension identifiers

  • allowed (bool) – Indicate whether Explorer role can view item

  • branch (str) – Project branch

Returns

None

analyze.dimension.view_manager(project_id, dimension_ids, allowed=True, branch='master')

Sets View Manager flag

Parameters
  • project_id (str) – Unique project identifier

  • dimension_ids (str) – Unique dimension identifier or list of unique dimension identifiers

  • allowed (bool) – Indicate whether Manager role can view item

  • branch (str) – Project branch

Returns

None

analyze.dimension.which_aliases(node)

Returns the aliases used by the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique alias node identifier

Returns

Aliases containing node and values

Return type

dict

analyze.dimension.which_attributes(project_id, name, node)

Returns the hierarchies and attribute node from the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

Returns

list of dicts with hHierarchies and attribute node for the node

Return type

list

analyze.dimension.which_hierarchies(project_id, name, node)

Returns the hierarchies from the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique hierarchy node identifier

Returns

Hierarchies containing node

Return type

list

analyze.dimension.which_properties(node)

Returns the properties used by the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique property node identifier

Returns

Properties containing node and values

Return type

dict

analyze.dimension.which_values(node)

Returns the values used by the specified node

Parameters
  • project_id (str) – Unique project identifier

  • name (str) – Unique name for hierarchy dimension

  • node (str) – Unique property node identifier

Returns

Values containing node and values

Return type

dict