Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
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(