Listing attributes of a particular level in a dimension via API call
Hi,
We are using the Oracle OLAP Java api's to browse the metadata and contents of an OLAP schema. We need to be able to access an api that lists just the Attributes that are mapped to a particular Level within a dimension.
Note the following snippet of code can be added to the OLAP Java examples. This displays a list of key value pairs. The keys are the unique level identifier in the form "HIERARCHY::LEVEL::ID", the value is the contents of the specified attribute. The result would be suitable for input to a combo box control in a JSP or similar.
public static void getFilters(String dimension, String hierarchy, String level, String attribute) throws Exception {
MdmPrimaryDimension mdmDimension = getMdmPrimaryDimension(dimension);
MdmHierarchy mdmHierarchy = getContext().getHierarchyByName(mdmDimension, hierarchy);
MdmLevel mdmLevel = getContext().getLevelByName((MdmLevelHierarchy) mdmHierarchy, level);
MdmAttribute mdmAttribute = getContext().getAttributeByName( mdmDimension, attribute);
StringSource levelSource = (StringSource)mdmLevel.getSource();
StringSource attributeSource = (StringSource)mdmAttribute.getSource();
Source querySource = attributeSource.join(levelSource);
try {
prepareAndCommit();
getContext().displayResult(querySource);
} catch (oracle.olapi.data.source.UnmatchedInputsException e) {
System.out.println("UNMATCHED ID's " + e.getUnmatchedInputIDs());
Prior to calling this we need a way of prompting the user to select the appropriate attribute to display in the value field of the list. We can get the full list of attributes for the Dimension with the following code snippet:
MdmPrimaryDimension mdmDimension = getMdmPrimaryDimension(dimension);
List attributes = mdmDimension.getAttributes();
However calling the code below returns an empty attribute list.
MdmPrimaryDimension mdmDimension = getMdmPrimaryDimension(dimension);
MdmHierarchy mdmHierarchy = getContext().getHierarchyByName(mdmDimension, hierarchy);
MdmLevel mdmLevel = getContext().getLevelByName((MdmLevelHierarchy) mdmHierarchy, level);
List attributes = mdmLevel.getAttributes();
What api's can we call that would let us list just the attributes mapped to the Level in question?
Any help is appreciated.
Regards,
Ed
<LINK (<IDESCENDANTS (PutMemberNameHere) AND <DIMBOTTOM (PutDimNameHere)
Similar Messages
-
Doubt regarding No. of elements at a particular level of a dimension
Hi,
What does the No. of elements at a particular level of a dimension indicate?How do you calculate it? Suppose we have 10 years data and the time dimesion levels goes as Year----Quarter----Month----Date what would be the no of elemets at each level?
Kindly post a reply at the earliest.Hi..
see my reply here..
no of elements in a logical level.
Regards
Kishore Guggilla -
Creating sublevels under levels for a dimension in AWM Oracle 10g
In Analytic Workspace Manager Oracle 10g, How can I create more sublevels under a particular level in a dimension?
for eg. Year is a dimension.It has 2 levels , Quarter and Month.
Under Quarter level I want to have Qtr1 and Qtr2 as sublevels.
Under Month level I want to have Jan,Feb,Mar,Apr,May,June as sublevels.
so that Qtr1 has Jan,Feb,Mar, and Qtr2 has Apr,May,JuneYou need to do this in your source table.
The source table can look something like this
qtr_id, qtr_name, month_id, month_name
1 , Qtr1 , 101 , january
1 , Qtr1 , 102 , febuary
1 , Qtr1 , 103 , march
2 , Qtr2 , 104 , april
2 , Qtr2 , 105 , may
2 , Qtr2 , 106 , june
Then map it to the dimension, and maintain it.
Keep in mind that the member(id) fields need to be unique. I.E january 2007 and january 2006 cannot have the same id.
Ragnar -
How do I set the zoom at a particular level as the default to ensure pages are not too small and that i don't have to change the zoom for each page? in English
== This happened ==
Every time Firefox opened
== From the beginningSome add-ons:
Default FullZoom: https://addons.mozilla.org/en-US/firefox/addon/6965 (I use this one)
No Squint: http://urandom.ca/nosquint/
Also:
http://support.mozilla.com/en-US/kb/Page+Zoom
http://support.mozilla.com/en-US/kb/Text+Zoom
http://kb.mozillazine.org/Browser.zoom.siteSpecific -
How to implement tooltip for the list items for the particular column in sharepoint 2013
Hi,
I had created a list, How to implement tooltip for the list items for the particular column in SharePoint 2013.
Any help will be appreciatedWe can use JavaScript or JQuery to show the tooltips. Refer to the following similar thread.
http://social.technet.microsoft.com/forums/en/sharepointdevelopmentprevious/thread/1dac3ae0-c9ce-419d-b6dd-08dd48284324
http://stackoverflow.com/questions/3366515/small-description-window-on-mouse-hover-on-hyperlink
http://spjsblog.com/2012/02/12/list-view-preview-item-on-hover-sharepoint-2010/ -
How to put validation between attributes at View Object level in BC4J
Hi,
Is it possible in BC4J to put validation between attributes at View Object level?
I know that I can do it at Entity Object level in validateEntity method, but I have several View Objects connected with one Entity Object and don't want to have the same validation logic for all View Objects.
Thanks for any help!It returns errorWhat error does it return?
John -
T.Code for viewing list of customers of particular account group - Reg
Hi,
Can anyone suggest me T.code to view list of customer of particular account group?
IS there any other method to view the list of customers in a particular account group?
Please, it is an urgent requirement.
Rewards sure
Regards,
SP.Balaji
Message was edited by:
balaji soundarapandianHi Sai Srinivas,
Already solved it and thanx for your help
Regards,
S.P.Balaji -
Xmlns attribute appearing in top level node
I have an xml message that is parsed and its DOM tree built. Then a portion of the message, identified by an xpath, is extracted which is stored as XMLNode, which is later printed to a stream.
Using the latest Oracle XML library ( comes with Oracle 10 ), the top level element in the node is always appended with extra 'xmlns' attribute.
This is an example. The original message does not have
this extra xmlns attribute.
<RESPONSE xmlns="http://www.nlis-hub.co.uk/NS/2001-01-10">
<PROPERTY_1>description 1</PROPERTY_1>
<PROPERTY_2>description 2</PROPERTY_2>
<PROPERTY_3>description 3</PROPERTY_3>
</RESPONSE>
How can we turn this behaviour off ?
Thanks,
DwiTHanks for replying.
Yes, the XML document has the namespace specified:
<ROOT_MESSAGE xmlns="http://www.nlis-hub.co.uk/NS/2001-01-10" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlis-hub.co.uk/NS/2001-01-10 Schema.xsd">
<RESPONSE>
<PROPERTY_1>description 1</PROPERTY_1>
<PROPERTY_2>description 2</PROPERTY_2>
<PROPERTY_3>description 3</PROPERTY_3>
</RESPONSE>
</ROOT_MESSAGE>
In our application, we are storing the <RESPONSE>
block to db as CLOB. We have a requirement to store it
exactly as it was received. However, the XML parser (or something) is including the xmlns attribute in the top level node of that portion
<RESPONSE xmlns="http://www.nlis-hub.co.uk/NS/2001-01-10">
</RESPONSE>
This is what is done to obtain the node:
(xpathStr is the xpath to the RESPONSE node )
NodeList nodeList = xmlDocument_.selectNodes( xpathStr, this );
int nodeLength = nodeList.getLength();
StringWriter xmlStringWriter = new StringWriter();
PrintWriter xmlPrintWriter = new PrintWriter( xmlStringWriter );
for( int nodeIndex = 0; nodeIndex < nodeLength; ++nodeIndex )
XMLNode node = (XMLNode)nodeList.item( nodeIndex );
node.print( xmlPrintWriter );
StringBuffer xmlStringBuffer = xmlStringWriter.getBuffer();
By the time it gets to the output stream, it already has the xmlns attribute appended to the top level node.
How can we prevent this ?
Thanks,
Dwi -
Setting session attributes at the Role level
I am running AM7.1 in Legacy mode and I am trying to create a role and assign session attributes at this role level. I followed the instructions for doing this but it does not seem to be working. I created the role and added the session service to it. I then went in an changed the attributes (Max Idle, Max Session, etc.) to the values I need for the role. I then assigned the role to a user. However when I log in as this user and look at the Active Sessions panel all of the values are still saying they are set at the defaults. It is not picking up the new values for the user. Am I missing something? Help! -Jeff
Reply i was also getting this problem in relam mode but 7.0..........but when i specify in the url?role=rolename..........i see the session info applied but i wanted it to be dyanmically applied(without specifiying the role in the url).......i have raised an SR but that is for 7.0 .........please do it for 7.1 i think you might get some response.
-
[Error]List attribute binding not properly updating Iterator value
Hi,
I created an ADF Form page with ADF navigation buttons. Along with that I added Create, Commit and Rollback buttons in the form. One of my attributeValue binding i changed it to dynamic list binding with another iterator (LOV style). I removed all field required properties to false and put showRequried property with corresponding binding attribute mandatory option in order to avoid alert messages. I also removed disabled option of commit and rollback to false option so that every time it will be enabled. There are fields in the form which are set as mandatory from entity. List is also a mandatory attribute.
When I press next, pervious buttons List points to corresponding LOV value perfectly. Now I press create and press submit without filling mandatory fields, JBO error is thrown. e.g. "JBO-27014: Attribute RociType in RociView is required". Now i press Rollback button, it comes back to first record. but List is showing empty. Again if i press Next button also, list value shows empty. When I printed the value of List attribute in an outputText #{bindings.RociType.inputValue} shows blank and #{bindings.RociType.attributeValue} shows orginal record value. #{bindings.RociType.inputValue} should show the corresponding index of iterator. Somehow after rollback this index is not properly updating.
Please help to solve this problem.
Details:
JDeveloper version 10.1.3
Project is JSF with ADF BC
Regards,
SanthoshHi,
After doing debug I understood that Rollback is not clearning Error list inside IteratorBinding. Due to that it is not getting proper input value. Please find the code for getInputValue() inside JUCtrlListBinding class.
* Primarily for spel support. Could be removed prior to 905Prod and merged into a get()
* method for spel-access.
* <p>
* Returns the last input value for the first attribute on this binding if this value
* raised an exception. Otherwise returns the value from the model object calling
* getAttribute(0);
* @javabean.property
public Object getInputValue()
getError();
if (mErrExc != null)
return mInputVal;
int sel = getSelectedIndex();
if (mInputVal != null && (sel == -1 || sel == mNullValueIndex))
return mInputVal;
return new Integer(sel);
}Is there a way to clear Errors inside Iteratorbinding when I press Rollback ???
Regards,
Santhosh
null -
Putting attribute value from java level into sessionScope variable?
Hallo,
is it possible to put an attribute value from java level into a sessionScope variable?
For example when i'am in prepareSession is it possible to fill a sessionScope variable which i can use in a jspx-Site? And when how i must do it?
Any help is appreciated.At the java level i make this
private void setUserIdIntoUserDataHashtable() {
Integer userid = getUserIdForLoggedInUser();
Integer groupid = getGroupIdForLoggedInUser();
Hashtable userdata = getDBTransaction().getSession().getUserData();
if (userdata == null){
userdata = new Hashtable();
userdata.put(PBConstants.CURRENT_USER_ID, userid);
userdata.put(PBConstants.CURRENT_GROUP_ID, groupid);
And when i at the java level i can use the constants. But i don't have an interaction at this point. Thats why i don't now how to bring the values to a sessionScope variable i need later in a / some sites? -
Listing attributes and characteristics
Here is my problem: List the attributes and characteristics of the following tables: Customer,Ord,Item,Products,Price
How do I do this is one script?The data dictionary views contain all the information about database objects.
SQL*Plus has a DESCRIBE command (usually abbreviated to DESC) that lists attributes for a specified object. -
Need to Update Price List at Ship to Address Level
Hello All,
Can you please let me know whether there is an API to update the price list at SHip to Address Level.
Thanks
RakeshCheck the TCA public API hz_cust_account_site_v2pub. I've used the below and am sure there'll be an update API as well.
hz_cust_account_site_v2pub.create_cust_acct_site
hz_cust_account_site_v2pub.create_cust_site_use
Thanks
Gopal -
To calculate average of a measure for particular level of calendar hierarchy across all years
Hi All,
Let say Data is available for 10 years: from 2005 to 20015
Calendar Hierarchy: Year -> Quarter -> Month -> Week -> Day
Let say Measure Name is : SalesAmt
Now, I want to create a calculated measure for calculating: Average of SalesAmt for Calendar Hierarchy at particular level (for all the 10 years). Means, if somebody selects, Jan, 2014 it should show Average of all the January’s data (coming from all the 10
years like average of Jan -2000, Jan-2001, Jan-2002......Jan-2015), similarly if somebody selects 1st Quarter, 2012 it should show Average of all the 1st Quarter of all the 10 years (average of 1st quarter 2000, 1st Quarter 2002....1st Quarter 2015).
Kindly suggest.
Thanks in advance.You should use ParallelPeriod. Ex:
SELECT ParallelPeriod ([Date].[Calendar].[Calendar Quarter]
, 3
, [Date].[Calendar].[Month].[October 2003])
ON 0
FROM [Adventure Works -
How to check whether a node exist in a Particular Level. (xmltype)
hi,
please help me to check whether a particular node exists in one level.
for eg
I have the following xml
<map>
<entry>
<key>
heading1
</key>
<map>
<entry>
<key> sub1 heading1</key>
<value> sub1 heading1 value </value>
</entry>
<entry>
<key> sub2 heading1 </key>
<value> sub2 heading1 value </value>
</entry>
</map>
</entry>
<entry>
<key>
heading2
</key>
<map>
<entry>
<key> sub1 heading2</key>
<value> sub1 heading2 value </value>
</entry>
<entry>
<key> sub2 heading2 </key>
<value> sub2 heading2 value </value>
</entry>
</map>
</entry>
</map>i need to check how many heading exists in this xml.
I am checking like
i:=1;
l_section := ip_xml.extract('//map/entry');
WHILE l_section.existsnode('entry[' || i|| ']') = 1 LOOP
// extract the key name within entry tag
// print the key name.
i:=i+1;
end loop;but iam getting all the key name like
heading1
sub1 heading1
sub2 heading1
heading2
sub1 heading2
sub2 heading2
I need only heading1 and heading2. how can I check whether a particular node exist in particular level.
first level , second level etc. Please helpbut iam getting all the key nameThat's because you're using a descendant axis : //map/entry
SQL> DECLARE
2
3 ip_xml xmltype := xmltype('<map>
4 <entry>
5 <key>
6 heading1
7 </key>
8 <map>
9 <entry>
10 <key> sub1 heading1</key>
11 <value> sub1 heading1 value </value>
12 </entry>
13 <entry>
14 <key> sub2 heading1 </key>
15 <value> sub2 heading1 value </value>
16 </entry>
17 </map>
18 </entry>
19 <entry>
20 <key>
21 heading2
22 </key>
23 <map>
24 <entry>
25 <key> sub1 heading2</key>
26 <value> sub1 heading2 value </value>
27 </entry>
28 <entry>
29 <key> sub2 heading2 </key>
30 <value> sub2 heading2 value </value>
31 </entry>
32 </map>
33 </entry>
34 </map>');
35
36 BEGIN
37
38 for r in (
39 select heading, headno
40 from xmltable( '/map/entry/key'
41 passing ip_xml
42 columns heading varchar2(30) path '.'
43 , headno for ordinality )
44 )
45 loop
46 dbms_output.put_line('Heading '||r.headno||' = '||r.heading);
47 end loop
48 ;
49
50 END;
51 /
Heading 1 =
heading1
Heading 2 =
heading2
PL/SQL procedure successfully completed
Maybe you are looking for
-
No item is specified in item 00000010003
Message no. F5670 No account was specified for account type "S" in item "0000001003" of the FI/CO document. The Financial Accounting program cannot process the document. A system error has probably occurred in the application you called up. Check the
-
Oracle Business Rules Question
Hi, I'm pretty new with Oracle Rules. I've had no trouble using them, to date. I define Java classes, set up the facts in Rules Author, and create the Dictionary, Ruleset, and rules... etc. I can run them fine, and the technology works as expected. M
-
FRM-10256 when running a form generated with headstart
I have installed Headstart 2.1.2.0.2 on an Oracle8 Enterprise 8.1.6 database. I'm using Designer 6.0.3.8.0 and Forms 6.0.8.8.0. I can access the Headstart supplied applications (eg. Foundation, Utilities, Demo), and I can generate forms from within D
-
SSL Authentication failure to ASA
We have a Cisco ASA 5520 running 7.1. We have users that connect via SSL. There are times when a user tries to logon via SSL that they get login failed multiple times and then say 10 or 30 minutes later authentication will succeeed. The failed attemp
-
Search in matrix make quicker_Business Partner
Hi experts, it may be simple, but made me in dilemma my question is i have a matrix which have some what 4000 rows. i want 2 select a particular row in the matrix. For that i have created a edit text and a button. by entering business partner name in