# Single Mode Filtering with one selection only eng.filter_selections(selections[3]) # Reset Filtering eng.restart() # Multiple Mode Filtering, filter ASETs with a filter based on multiple selection criteria eng.filter_selections(selections[:3], mode='multiple') # Notice the WARNING # *** WARNING *** Selection - CQL(200, 9)[prtcol].Where($v='Red') is skipped # Continue in single filtering mode with those selections left eng.filter_selections([selections[1], selections[3]]) # ------------------------------------------------ # Verification # ------------------------------------------------ mis.get_asets() # Check selections mis.get_selections() # Check count mis.count_items() # Check values of a specific Entity mis.dms.switch(500, 12) for alias in [attr.alias for attr in mis.dms.get_attributes(out='objects')]: print(mis.get_items(alias=alias, highlight=False, excluded=False), '\n') # Get back associations represented as tuples mis.get_tuples(13, 14, 15, 16, 17, 18, aset_dim2=12, hb2=True, hb1=True)
mis.connect_to_metastore(dbms='mariadb', host='localhost', port=3306, user='******', password='******', database='TRIADB', trace=0) # Set DataModel eng = mis.restart(500, reset=True) # Make multiple values selection for Customer Country mis.select('Brazil, Mexico, Argentina', In=True, alias='c_country') # ------------------------------------------------------------------------ # Testing queries # ------------------------------------------------------------------------- # Set HyperAtom Collection on an attribute of the data model, e.g. order quantity eng.set_hacol(alias='odet_quantity') print(eng.hacol.str) mis.get_items(alias='odet_quantity', highlight=False) mis.get_items(alias='odet_quantity', order_by='$v DESC', excluded=False, highlight=False) eng.set_hacol(alias='o_shipped') eng.hacol.cql.Over('$k, $v, $c').Where('toYear($v)=1996').Order( '$v DESC').Exe().Res