1 package cwm$olap$cube as
2
3 -- Create a new cube, a logical grouping of dimensions and measures
4 --
5 -- param owner the owner of the cube
6 -- param cube_name the name of the cube
7 -- param display_name the display name for the cube
8 -- param description description text for the cube
9 --
10 -- raise invalid_name if cube name is invalid
11 -- raise no_access_privileges if user has no privileges to create the cube
12 -- raise cube_already_exists if a cube already exists with the same name
13 -- raise user_not_found if the owner does not exist
14 procedure create_cube(owner varchar2
15 , cube_name varchar2
16 , display_name varchar2
17 , description varchar2);
18
19 -- Set a new display name for the cube
20 --
21 -- param owner the owner of the cube
22 -- param cube_name the name of the cube
23 -- param display_name the display name for the cube
24 --
25 -- raise no_access_privileges if user has no privileges to edit the cube
26 -- raise cube_not_found if cube doesn't exist
27 procedure set_display_name (owner varchar2
28 , cube_name varchar2
29 , display_name varchar2);
30
31 -- Set a new description for the cube
32 --
33 -- param owner the owner of the cube
34 -- param cube_name the name of the cube
35 -- param description description text for the cube
36 --
37 -- raise no_access_privileges if user has no privileges to edit the cube
38 -- raise cube_not_found if cube doesn't exist
39 procedure set_description(owner varchar2
40 , cube_name varchar2
41 , description varchar2);
42
43 -- Add a dimension use into the cube
44 --
45 -- param cube_owner owner of the cube
46 -- param cube_name name of the cube
47 -- param dimension_owner owner of the dimension
48 -- param dimension_name name of the dimension
49 -- param dimension_alias alias for the dimension use
50 -- return number id of cube dimension use
51 --
52 -- raise no_access_privileges if user has no privileges to edit the cube
53 -- raise cube_not_found if cube doesn't exist
54 -- raise dimension_not_found if dimension doesn't exist
55 -- raise alias_not_unique if alias is not unique
56 function add_dimension(cube_owner varchar2
57 , cube_name varchar2
58 , dimension_owner varchar2
59 , dimension_name varchar2
60 , dimension_alias varchar2) return number;
61
62 -- Remove a dimension use from the cube
63 --
64 -- param cube_owner owner of the cube
65 -- param cube_name name of the cube
66 -- param dimension_owner owner of the dimension
67 -- param dimension_name name of the dimension
68 -- param dimension_alias alias for the dimension use
69 --
70 -- raise no_access_privileges if user has no privileges to edit the cube
71 -- raise cube_not_found if cube doesn't exist
72 -- raise dimension_not_found if dimension doesn't exist
73 procedure remove_dimension(cube_owner varchar2
74 , cube_name varchar2
75 , dimension_owner varchar2
76 , dimension_name varchar2
77 , dimension_alias varchar2);
78
79 -- Specify another dimension use that this dimension use depends on for
80 -- solve order within the cube
81 --
82 -- param owner owner of cube
83 -- param cube_name name of cube
84 -- param cube_dimension_use_id id of use to set dependency on
85 -- param dependent_dimension_use_id id of dependent use
86 --
87 -- raise no_access_privileges if user has no privileges to edit cube
88 -- raise cube_not_found if cube doesn't exist
89 -- raise use_not_in_same_cube if uses are in different cubes
90 -- raise dimension_usage_not_found if either use id is invalid
91 procedure set_dimension_dependency(owner varchar2
92 , cube_name varchar2
93 , cube_dimension_use_id number
94 , dependent_dimension_use_id number);
95
96 -- Specify another dimension use that this dimension use depends on for
97 -- solve order within the cube
98 --
99 -- param owner owner of cube
100 -- param cube_name name of cube
101 -- param dimension_owner owner of dimension to set dependency on
102 -- param dimension_name name of dimension to set dependency on
103 -- param dimension_alias alias of dimension to set dependency on
104 -- param dependent_dimension_owner owner of dependent dimension
105 -- param dependent_dimension_name name of dependent dimension
106 -- param dependent_dimension_alias alias of dependent dimension
107 --
108 -- raise no_access_privileges if user has no privileges to edit cube
109 -- raise cube_not_found if cube doesn't exist
110 -- raise use_not_in_same_cube if uses are in different cubes
111 -- raise dimension_usage_not_found if either use id is invalid
112 procedure set_dimension_dependency(owner varchar2
113 , cube_name varchar2
114 , cube_dimension_owner varchar2
115 , cube_dimension_name varchar2
116 , cube_dimension_alias varchar2
117 , dependent_dimension_owner varchar2
118 , dependent_dimension_name varchar2
119 , dependent_dimension_alias varchar2);
120
121 -- Set the default calculation hierarchy for a dimension use within a cube
122 --
123 -- param cube_owner owner of the cube
124 -- param cube_name name of the cube
125 -- param dimension_owner owner of the dimension
126 -- param dimension_name name of the dimension
127 -- param dimension_alias alias for the dimension use
128 --
129 -- raise no_access_privileges if user has no privileges to edit the cube
130 -- raise cube_not_found if cube doesn't exist
131 -- raise dimension_not_found if dimension doesn't exist
132 -- raise hierarchy_not_found if hierarchy doesn't exist
133 procedure set_default_calc_hierarchy(cube_owner varchar2
134 , cube_name varchar2
135 , hierarchy_name varchar2
136 , dimension_owner varchar2
137 , dimension_name varchar2
138 , dimension_alias varchar2);
139
140 -- Delete a cube.
141 --
142 -- param cube_owner owner of the cube
143 -- param cube_name name of the cube
144 --
145 -- raise no_access_privileges if user has no privileges to edit the cube
146 -- raise cube_not_found if cube doesn't exist
150
147 procedure drop_cube(owner varchar2
148 , cube_name varchar2);
149
151 -- Rebuild the cube mappings after fact table has been dropped and recreated
152 --
153 -- param cube_owner owner of the cube
154 -- param cube_name name of the cube
155 --
156 -- raise no_access_privileges if user has no privileges to edit the cube
157 -- or has no access to referenced fact table
158 -- raise dimension_not_found if a dependent dimension does not exist
159 -- raise cube_not_found if cube doesn't exist
160 -- raise column_not_found if column doesn't exist in referenced fact table
161 -- raise rebuild_failed if the rebuild could not be achieved
162 procedure rebuild(owner varchar2
163 , cube_name varchar2);
164
165 -- Map the dimension use to the fact table - dimension table rely constraint
166 --
167 -- param cube_owner owner of the cube
168 -- param cube_name name of the cube
169 -- param fact_table_owner owner of the fact table
170 -- param fact_table_name name of the fact table
174 -- param dimension_name name of the dimension
171 -- param foreign_key_name name of the rely constraint to dimension table
172 -- param level_name lowest level of dimension
173 -- param dimension_owner owner of the dimension
175 -- param dimension_alias alias for the dimension use
176 -- param override_mappings override existing fact mappings if conflict
177 --
178 -- raise no_access_privileges if user has no privileges to edit the cube
179 -- raise cube_not_found if cube doesn't exist
180 -- raise table_not_found if table doesn't exist
181 -- raise foreign_key_not_found if rely constraint does not exist
182 -- raise dimension_not_found if dimension does not exist
183 -- raise level_not_found if level does not exist
184 -- raise multiple_uses_exist if alias must be specified to qualify use
185 -- raise cannot_override_fact_mappings if different fact mappings exist
186 -- and override_mappings false
187 procedure map_cube(cube_owner varchar2
188 , cube_name varchar2
189 , fact_table_owner varchar2
190 , fact_table_name varchar2
191 , foreign_key_name varchar2
192 , level_name varchar2
193 , dimension_owner varchar2
194 , dimension_name varchar2
195 , dimension_alias VARCHAR2
196 , override_mappings BOOLEAN := false);
197
198 -- Lock the cube metadata for update
199 --
200 -- param owner owner of the cube
201 -- param cube_name name of the cube
202 -- param wait_for_lock wait for lock if acquired by other user
203 --
204 -- raise no_access_privileges if user has no privileges to edit the cube
205 -- raise cube_not_found if cube does not exist
206 -- raise failed_to_gain_lock if lock could not be acquired
207 procedure lock_cube(owner varchar2
208 , cube_name varchar2
209 , wait_for_lock boolean := false);
210
211
212
213 -- PRIVATE function for API to get the internal id of cube
214 --
215 -- param owner owner of the cube
216 -- param cube_name name of the cube
217 --
218 -- raise cube_not_found if cube doesn't exist
219 function get_cube_id(owner varchar2
220 , cube_name varchar2) return number;
221 end;