Advertisement
miholeus

saiku olap test

Dec 2nd, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import olap.xmla.xmla as xmla
  2.  
  3. location = "http://localhost:8080/saiku/xmla"
  4.  
  5. xmla_provider = xmla.XMLAProvider()
  6.  
  7. xmla_connection = xmla_provider.connect(location=location)
  8.  
  9. olap_source = xmla_connection.getOLAPSource()
  10.  
  11. h = olap_source.getCatalog('FoodMart').getCube('Sales').getDimension('[Product]').getHierarchy('[Products')
  12.  
  13. for member in h.getMembers():
  14.     print "Member: %s" % member.getUniqueName()
  15.  
  16.     if member.hasChildren():
  17.         #ERROR OCCURS WHEN EXECUTING NEXT LINE
  18.         for child in member.getChildren():
  19.             print "Child: %s" % child.getUniqueName()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement