Format strings / typed measures / mdxformat()
Hi all,
what is the 'secret' of format strings? I read the manual but I don't understand the clear difference to 'typed measures'. According to dbag format strings need a MDX Format directive.
MDX Format Directive
A format string is defined by the following syntax:
format_string_expression = MdxFormat ( string_value_expression ) where string_value_expression is a valid MDX string value expression as described in the MDX specification documented in theOracle Essbase Technical Reference.
I don't find any documentation about a MDX Format directive. Does anybody have 'speaking sample'...I just want to get the idea...
And again, what is the clear difference to typed measures?
Thanks
Robert
Farmat strings are part of typed measures. they allow you to use MDX to set up different ways of looking at data. With a text list you are limited to integer values for data with a format string you could use a case statement to define ranges like case when [sales] < 100 then "bad" else "good"
Similar Messages
-
Format string in Essbase 11.1.1
Hello Experts,
I tried the following from the examples:
MdxFormat(
CASE
WHEN CellValue() <= 5 THEN “Low”
WHEN CellValue() <= 10 THEN “Medium”
WHEN CellValue() <= 15 THEN “High”
ELSE “Very High”
END
no success
CASE
WHEN CellValue() <= 5 THEN “Low”
WHEN CellValue() <= 10 THEN “Medium”
WHEN CellValue() <= 15 THEN “High”
ELSE “Very High”
END
no success
CellValue()
no success
What is a valid format string?
I would appreciate if you could explain me format string and valid example.
Environment :
Essbase 11.1.1
OS : Win Server 2003
Thanks in advance.
Regards,
SonuRefer the Essbase 11.1.1 Administration Guide document, Chapter 12 "Working with Typed Measures" , under section "Working with Format Strings" in Page 195
A format string is defined by the following syntax:
format_string_expression = MdxFormat ( string_value_expression )
where string_value_expression is a valid MDX string value expression as described in the MDX specification documented in theOracle Essbase Technical Reference.
How to Download Essbase 11.1.1 Database Administrator's Guide and Technical Reference Document.
a) Login into Metalink.
b) Select the option "Knowledge" from the Menu. Under the section "Hyperion Online Product Documentation", Click on the link "Hyperion 11.1.1 Documentation"
c) In the Documentation Library window, Select the tab "Essbase" (http://download.oracle.com/docs/cd/E12825_01/nav/portal_3.htm) and under Oracle Essbase, download the "Database Administrator's Guide" and "Technical Reference" Documents.
Example 1:
MdxFormat
( CASE
WHEN CellValue() <= 5 THEN
"Low"
WHEN CellValue() <= 10 THEN
"Medium"
WHEN CellValue() <= 15 THEN
"High"
ELSE
"Very High"
END
Example 2:
MdxFormat(numtostr(cellvalue())) // need to use mdxformat and numtostr to input a string argument. -
I'm writing a program which will utilize the internal memeory of the Agilent 34410A DMM for making fast measurements (10K/s). In order to do this, I need to setup a test, have the data stored to the internal memory, then read and delete it, while other measurements are still happening. The best command for the read/delete function is the R? command, but it returns the data in a strange format which breaks the ViScanf format string.
an example of the R? reading in below:
R? 2
#231+2.87536000E-04,+3.18131400E-03
Is there a way to setup the ViScanf format string to handle this?
Thanks
RyanYes, I am using CVI
If it was just returning one value I would use a simple viScanf function like this:
viScanf (vi, "%f", fbuf);
If you do a READ from in the instrument, it returns an array of floats so you need to adjust you viScan fuction parse the string into an array of floats like this (array of 500 for this example):
viScanf(vi, "%,500f", fbuf);
The problem is the data response to the R? command starts with the array size and is then followed by the data (#231+2.87536000E-04,+3.18131400E-03). In the previous example, I need to delete the #, and parse the 231 into an array size variable and then fill an array (fbuf in this case) with the data. -
Dataexport to Oracle tables with typed measures.
Hi,
Does anyone know if it is possible to export typed measures (dates and text) to an Oracle table using dataexport under Essbase 11.1.1.2? I've tried but I just get a message saying 'unable to export data to sql table' with no associated sql/odbc error messages:
[Mon Aug 17 21:10:03 2009]Local/ChangeR/Change4/admin/Info(1021041)
Connection String is [DSN=datadump;UID=...;PWD=...;]
[Mon Aug 17 21:10:03 2009]Local/ChangeR/Change4/admin/Info(1021000)
Connection With SQL Database Server is Established
[Mon Aug 17 21:10:03 2009]Local/ChangeR/Change4/admin/Error(1012085)
Unable to export data to SQL table [change_request4]. Check the Essbase server log and the system console to determine the cause of the problem.
[Mon Aug 17 21:10:03 2009]Local/ChangeR/Change4/admin/Info(1021002)
SQL Connection is Freed
[Mon Aug 17 21:10:03 2009]Local/ChangeR/Change4/admin/Warning(1080014)
Transaction [ 0x1e0003( 0x4a89b91b.0x69398 ) ] aborted due to status [1012085].
I know it's something to do with the typed measures as I copied the cube and deleted the typed measures and had the dataexport working just fine. I've also tried changing the table fields from date & varchar2 to number just in case dataexport was ignoring the smartlist/date lookups.
For the record, typed measures are exported correctly to text files, so it's seems to be just ODBC targets that I'm having this problem with.
Thanks,
Paul.
Edited by: user602952 on 17-Aug-2009 13:30Thanks Glenn, but I've already tried that - (it's varchar2 in oracle) - I've tried various combinations of varchar2, number and date all to know avail and all with no helpful messages that might give me a clue.
-
Load associate format string using DLR
Hi,
I'm trying to load an associate format string with a DLR from a text datafile.
My DLR has been built like this :
PARENT0,Account CHILD0, Account ALIAS0,Account PROPERTY0,Account PROPERTY0,Account PROPERTY0,Account
Father Child Alias Store ^ mdxformat(...)
The mdxformat(...) code works fine when I add it manually in the outline via EAS
But everytime I load with a DLR I got this error message
\\Record #23 - Error adding Dynamic calc property to member Child (3320)
\\Record #23 - Level 0 virtual members must have a formula associated with them
I'm using Essbase 11.1.2
I removed the mdxformat from my datafile and the member is load properly.
Regards,
FranckFinally no solution, I added it manually
-
Reporting Essbase typed measures
Is anyone using Typed Measures in Essbase? I cannot seem to format a date measure and the text measures output the value instead of the associated text from the text list.
You can lock and send text measures with the Excel Addin, what error message are you getting.
Cheers
John
http://john-goodwin.blogspot.com/ -
Hi,
Sorry if this has already been asked, couldn't find it in the pages of results that came up for string formatting.
I'm trying to output a string to serial, to control a robot arm for my undergrad final year project. At the moment it'll work if I put in a manually typed in string, but I want to make a nice VI GUI for the 'bot. To do this I need combined strings
eg
at the moment if I type in "joint\s1\s90\r\n", I'll get the 1st joint to move 90 degrees, and a return and a new line.
However, if I have these things combined using format string or concatenate string, it won't run.
Any ideas why? No one in my college seems to know, so I thought I'd ask here.
ThanksDid you try something like this?
Note: All strings are displayed as slash code...
Message Edited by paulmw on 11-28-2006 08:09 AM
Attachments:
bd.JPG 8 KB
fp.JPG 6 KB -
Dynamically update values in Text Lists for typed measures
Hi,
We have an alpha-numeric data column in our fact table. This is a data coulmn and we want to store its content as data value in one of the measures. The value in this column is highly dynamic and it is not restricted to a fixed set of values. To store the values we need to use typed measures, but is there way in which I can define the text list itself dynamically? Meaning, we will build the text list dynamically as and when the data comes in the fact table. Is this possible. We are using 11.1.2.1.
Regards,
KrishnaI don't think we have a MaxL (I can be worng) to update Text Lists. You can try creating .slt file dynamically and then manually import them before data load.
.slt will have entries like
#MISSING NoData
#OUTOFRANGE OutOfRange
3 Bad
2 Average
1 Good
Edited by: Celvin Kattookaran on Mar 21, 2013 12:33 PM -
Parsing formatted String to Int
How can I parse formatted string to Integer ?
I have a formated string like this $900,000 and I need to convert it to 900000 so I could do calculations with it.
I tried something like this
NumberFormat nf = NumberFormat.getIntegerInstance(request.getLocale());
ttlMargin=nf.parse(screenVal);I got this exception
"java.lang.NumberFormatException: For input string: "$1,050,000""I am working on the JSP file that provides
margins,sales etc. I am reading this data off the
screen where it is beeing displayed according to the
accounting practices.
That's why I get it as a formatted string and why I
am trying covert that string to the numberScreen-scraping is a problematic, bad design. It sounds like what you really want is to call a web service which returns its results as data that a program can understand (XML, for example), not HTML (which is meant more for humans to read). I know, you probably can't change the design at this point... just food for thought. In the meantime, you'll probably have to manually parse those strings yourself by stripping out the '$' and ',' characters and then use parseInt on the result. -
Hi,
Exchange 2010 MP fails to run Troubleshoot-DatabaseSpace.ps1. Results in a Warning with "Error formatting a string: Format string is not supported". The EventNumber is 402. The Microsoft article it points to is useless at http://technet.microsoft.com/en-us/library/749e0eac-ebb2-41e3-8fa2-4a03a1bd3571.aspx
Run ".\Troubleshoot-DatabaseSpace.ps1 -Server MailboxServer.domain.com -MonitoringContext" and works fine.
Any help appreciated.
thanksHi,
Before the newer MP release, we can disable these 4 monitor via override and this should not run the Troubleshoot-DatabaseSpace.ps1 :
KHI: Failed to execute Troubleshoot-DatabaseSpace.ps1.
KHI: The database copy is low on database volume space and continues to grow. The volume is under 25% free
KHI: The database copy is low on database volume space and continues to grow. The volume has reached error levels under 16% free.
KHI: The database copy is low on database volume space and continues to grow. The volume has reached critical levels 8% free.
Alex Zhao
TechNet Community Support -
How to get the system date format string?
Hello, everybody!
I want to create a MaskFormatter with a mask for dates. So, I could suply as the constructor parameter: "##/##/####'. However, what if the year comes first in the current system date format settings, or the month is in the second place or in the first?... So, I can't just suppose that the current locale format for dates is like the one above. So, my question is: is there a way to get the SYSTEM DATE FORMAT STRING in Java? Searching in google I saw that this was already asked in this forum:
http://forum.java.sun.com/thread.jspa?threadID=301034&messageID=1193794
but there was no effective answer. Does someone already know how to get this?
Thank you.
MarcosHi, not sure, but
import java.text.*;
SimpleDateFormat sdf = new SimpleDateFormat();
System.out.println(sdf.toPattern());
will output something like dd/MM/yy HH:mm
hthThank you very much. It worked. -
SQL LOADER and ORA-01861: literal does not match format string
Hi,
I've to load data through control_file(.ctl) into oracle table through sqlldr. Oracle 11g, win xp.
as soon as I use - sqlldr dss/dss control=orders.ctl I get error or nothing.
Text file that is generated after loading fails has the following error.
Record 1: Rejected - Error on table ORDERS, column O_ORDERDATE.
ORA-01861: literal does not match format string
I have checked the format of data to be loaded into Orders table is like this : *1996-01-02.*
I checked the format of data in my database by querying sysdate from dual i.e. 10-JAN-10
I thought that changing its format might solve my problem so i tried this:
SQL> alter session set nls_date_format='YYYY-MM-DD';
Session altered.
SQL> select sysdate from dual;
SYSDATE
2010-01-10but still i'm getting the same error. I've to load millions of data. how I can solve this issue.
Please suggest.
Thanks alot.
Best Regads,
KamHi,
It's strange ....nobody knew it?. I think this type of load problem will be very common isn't it.... where date column data is in a different format than in the db i.e.
How to change *1996-01-02* in the Control_file to make it able to load in the table where sysdate is like this: *11-JAN-10*
Sample data to be loaded is :
1|36901|O|173665.47|1996-01-02|5-LOW|Clerk#000000951|0|nstructions sleep furiously among |
Desc Orders
O_ORDERDATE NOT NULL DATEI have tested this by creating a test table and a test control file by omitting this O_ORDERDATE and then everything was fine, data was inserted but don't know how to load this DATE also.
Also not able to understand about POSITION in the control file...?
Regards,
Kam -
SQL Error: ORA-01861: literal does not match format string
Hello,
I'm trying to do data mining on a web log which recorded one day web access information from a busy web server. I imported the data into Oracle Data miner, and created a table (WEBLOG). The idea is to create a new field, i.e. session, for the users so that each session could be thought as a representative of a user-intent (aka topic). Now based on this, data mining models would be used to cluster(group) the users based on their similarity. The first step is to prepare the data which involves using SQL queries. So first, all I did was to create a function for date and time. This is the following code I used,
create or replace function ssndate(p_date in varchar2 default '03-01-18',
p_time in varchar2)
return number
$if dbms_db_version.ver_le_10 $then
deterministic
$elsif dbms_db_version.ver_le_11 $then
result_cache
$end
as
begin
return trunc((to_date(p_date||' '||p_time, 'dd-mm-yy hh24:mi:ss')
- to_date('01-01-90','dd-mm-yy')) * (86400/2400));
end ssndate;
The function ssndate compiled successfully.
The next step I took was to create a view through the following query,
create or replace view WEBLOG_VIEWS
as
select (select ssndate(LOG_DATE, LOG_TIME) from dual) as "SESSION_DT",
C_IP,
CS_USER_AGENT,
(CS_URI_STEM||'?'||CS_URI_QUERY) as WEB_LINK
from WEBLOG;
This was successful as well. The problem is in the next step where I try to do data grouping.
create table FINAL_WEBLOG as
select SESSION_DT, C_IP, CS_USER_AGENT,
listagg(WEB_LINK, ' ')
within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
from WEBLOG_VIEWS
group by C_IP, CS_USER_AGENT, SESSION_DT
order by SESSION_DT
For this, I got the error,
Error starting at line 1 in command:
create table FINAL_LOG as
select SESSION_DT, C_IP, CS_USER_AGENT,
listagg(WEB_LINK, ' ')
within group(order by C_IP, CS_USER_AGENT) "WEB_LINKS"
from WEBLOG_VIEWS
group by C_IP, CS_USER_AGENT, SESSION_DT
order by SESSION_DT
Error at Command Line:1 Column:7
Error report:
SQL Error: ORA-01861: literal does not match format string
ORA-06512: at "DMUSER.SSNDATE", line 11
ORA-06512: at line 1
01861. 00000 - "literal does not match format string"
*Cause: Literals in the input must be the same length as literals in
the format string (with the exception of leading whitespace).
If the "FX" modifier has been toggled on, the literal must
match exactly, with no extra whitespace.
*Action: Correct the format string to match the literal.
I don't know where I'm going wrong with this.. the to_date function should be fine. In the data that I possess, the date and time are in no format. Example: 30118 and 0:00:09 respectively. If anyone has any clue about this I would be sincerely grateful for any help that I can get!! It's quite urgent..
The Oracle version is 11.2.0.1.0
Edited by: 975265 on Dec 5, 2012 5:31 PM975265 wrote:
Ok.. Looks like I touched a nerve there. I apologize. I'm still a student, and this is the first time that I've tried something at this level. I'm still in the learning process, so I was hoping that someone could point me in the right direction in order to "fix" the data.Not so much touching a nerve as simply trying to implement a very very poor, but all too common, practice. Since you are a student (which we didn't know until this post) most people will cut you some slack. However, this little exchange should now be burned into your brain as you move forward. One of the very first rules of programming is to ALWAYS use the correct data types for your data. And along with that, never ever depend on implicit type conversions - always use the proper explicit conversion functions.
And as a slight follow-on, when considering the appropriate data type, don't assume that just because we refer to a given element as a 'something number' that it is indeed a number. Telephone "numbers" are NOT numbers. U.S. Social Security "numbers" are NOT numbers. U.S. Postal Zip codes are NOT numbers. All are just character strings which, by convention, we limit to the same characters we use to represent numbers.
And since this entire discussion came up around the representation of dates, you might want to take a look at http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/
Now, go forth and be a smarter programmer than your peers.
Edited by: EdStevens on Dec 6, 2012 6:12 AM -
I have problem in using the following expression in my "Assign" activity:
oraext:format-string('|{0}|',bpws:getVariableData('inputVariable','payload','/client:process/client:name_param))
I get the following error
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>XPath expression failed to execute.
An error occurs while processing the XPath expression; the expression is oraext:format-string(‘|{0}|',bpws:getVariableData('inputVariable','payload','/client:process/client: name_param')).
The XPath expression failed to execute; the reason was: internal xpath error.
Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
</faultstring><faultactor/><detail><exception/></detail></env:Fault></env:Body></env:Envelope>
Strangely, I can use the following expressions:
1. concat('|', bpws:getVariableData('inputVariable','payload','/client:process/client:name_param))
2. oraext:format-string('|{0}|', 'A value')
Hence, it seemed to me that oraext:format-string() can't take the return value of bpmw:getVariableData() for some unknown reason.
As I need to use the "format-string" function to create a complicated value based on a number of input values , I need to find a way to work around this.
Otherwise, I am force to use the "concat" function which make it extra ugly to build the value I need.
Please help!You need to wrap each parameter with striing().
Something like this: oraext:format-string(*string*($inputVariable.payload/client:inputBase), string($inputVariable.payload/client:inputVal0))
This way the oraext:format-string will work fine from bpel assign activity as well.
Racheli. -
Error: ORA-01861: literal does not match format string
Hi,
I am doing a RFC-XI-JDBC scenario.
In the CC monitoring , i am getting this error for the reciver CC:
"Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. "TableNAMe"(structure 'STATEMENTNAME'): java.sql.SQLException: ORA-01861: literal does not match format string "
Please guide me what can be the cause and how to solve it.
Thanks,
PuneetThis is how my payload looks like :
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_JDBC_REC xmlns:ns1="https:namespace.scene3">
<STATEMENTNAME>
<TABLE_NAME action="INSERT">
<TABLE>ggclgis</TABLE>
<access>
<VALVE_ID>12584</VALVE_ID>
<EQUNR>122</EQUNR>
<ERNAM>12122</ERNAM>
<INVNR>1212</INVNR>
<GROES>1212</GROES>
<ELIEF>123</ELIEF>
<GWLEN>21-jul-2008</GWLEN>
<GWLDT>12-jun-2006</GWLDT>
<SERGE>wqwqw</SERGE>
<TYPBZ>wqwqwq</TYPBZ>
</access>
</TABLE_NAME>
</STATEMENTNAME>
</ns1:MT_JDBC_REC>
Please tell me if it looks fine.
Maybe you are looking for
-
Hello, i installed a lot of Apps on my iPad (both free and purchased), then a sad day i had to change my apple ID (due to some mistakes in configuring the ipad for my wife with a different apple ID and for icloud...). Now i have apps with my last ap
-
Hello, i would like to play Anno 1404 on wine, as I don't want to setup an own windows partition. I've installed it with wine, set the dbghelp.dll to native, and set DirectX to version 9 in the engine.ini of Anno. Now i try to start it, but the intro
-
Hi, We got 1 SunFire12K and 15K and 2 clusters are configured, But the cluster nodes in each cluster are from the same server (15K or 12K), which we feel is not very good. We need to move the cluster nodes across SunFire Servers Following are my quer
-
i am trying to download illustrator cs6 and get error #2046 what does this mean?
-
I watched an Adobe webinar today about CC 2014 innovations. A.o. it said to have a look in your AAM, there were the list of installed apps ends and not yet installed apps starts. There I should click on 'Filters and Versions" (or such, translated fro