How to use the mdxpy.MdxHierarchySet.default_member function in mdxpy

To help you get started, we’ve selected a few mdxpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cubewise-code / tm1py / Tests / Cell.py View on Github external
def test_execute_mdxview_dataframe_pivot(self):
        mdx = MdxBuilder.from_cube(CUBE_NAME) \
            .add_hierarchy_set_to_row_axis(MdxHierarchySet.default_member(DIMENSION_NAMES[0])) \
            .add_hierarchy_set_to_column_axis(MdxHierarchySet.default_member(DIMENSION_NAMES[1])) \
            .where(Member.of(DIMENSION_NAMES[2], "Element1")) \
            .to_mdx()

        view = MDXView(CUBE_NAME, PREFIX + "MDX_VIEW", mdx)
        self.tm1.cubes.views.create(
            view=view,
            private=False)

        pivot = self.tm1.cubes.cells.execute_view_dataframe_pivot(
            cube_name=CUBE_NAME,
            view_name=view.name,
            private=False)
        self.assertEqual((1, 1), pivot.shape)

        self.tm1.cubes.views.delete(
            cube_name=CUBE_NAME,
github cubewise-code / tm1py / Tests / Cell.py View on Github external
def test_execute_mdxview_dataframe_pivot(self):
        mdx = MdxBuilder.from_cube(CUBE_NAME) \
            .add_hierarchy_set_to_row_axis(MdxHierarchySet.default_member(DIMENSION_NAMES[0])) \
            .add_hierarchy_set_to_column_axis(MdxHierarchySet.default_member(DIMENSION_NAMES[1])) \
            .where(Member.of(DIMENSION_NAMES[2], "Element1")) \
            .to_mdx()

        view = MDXView(CUBE_NAME, PREFIX + "MDX_VIEW", mdx)
        self.tm1.cubes.views.create(
            view=view,
            private=False)

        pivot = self.tm1.cubes.cells.execute_view_dataframe_pivot(
            cube_name=CUBE_NAME,
            view_name=view.name,
            private=False)
        self.assertEqual((1, 1), pivot.shape)

        self.tm1.cubes.views.delete(