共用方式為


探索:olapR explore 方法

允許探索 Cube 中繼資料

使用方式

  explore(olapCnn, cube = NULL, dimension = NULL, hierarchy = NULL, level = NULL)

引數

olapCnn

OlapConnection() 所傳回類別 "OlapConnection" 的物件

cube

指定 Cube 名稱的字串

dimension

指定維度名稱的字串

hierarchy

指定階層名稱的字串

level

指定層級名稱的字串

詳細資料

explore

列印 Cube 中繼資料。 傳回 NULL。 如果引數無效,則會擲回錯誤。

備註

必須依序指定引數。 例如:若要探索階層,必須指定維度和 Cube。

參考資料

如需參考,請參閱 execute2DexecuteMD

另請參閱

query、OlapConnectionexecuteMDexecute2D

範例


 cnnstr <- "Data Source=localhost; Provider=MSOLAP;"
 ocs <- OlapConnection(cnnstr)

 #Exploring Cubes
 explore(ocs)
 #Analysis Services Tutorial
 #Internet Sales
 #Reseller Sales
 #Sales Summary
 #[1] TRUE

 #Exploring Dimensions
 explore(ocs, "Analysis Services Tutorial")
 #Customer
 #Date
 #Due Date
 #Employee
 #Internet Sales Order Details
 #Measures
 #Product
 #Promotion
 #Reseller
 #Reseller Geography
 #Sales Reason
 #Sales Territory
 #Ship Date
 #[1] TRUE

 #Exploring Hierarchies
 explore(ocs, "Analysis Services Tutorial", "Product")
 #Category
 #Class
 #Color
 #Days To Manufacture
 #Dealer Price
 #End Date
 #List Price
 #Model Name
 #Product Categories
 #Product Line
 #Product Model Lines
 #Product Name
 #Reorder Point
 #Safety Stock Level
 #Size
 #Size Range
 #Standard Cost
 #Start Date
 #Status
 #Style
 #Subcategory
 #Weight
 #[1] TRUE

 #Exploring Levels
 explore(ocs, "Analysis Services Tutorial", "Product", "Product Categories")
 #(All)
 #Category
 #Subcategory
 #Product Name
 #[1] TRUE

 #Exploring Members
 #NOTE: -> indicates that the following member is a child of the previous member
 explore(ocs, "Analysis Services Tutorial", "Product", "Product Categories", "Category")
 #Accessories
 #Bikes
 #Clothing
 #Components
 #Assembly Components
 #-> Assembly Components
 #--> Assembly Components