OLAP universe filter with pattern matching.
Hi,
I tried to create both a qaaws and a webi report which contained a filter with pattern matching on an olap universe . When I ran this it took too long to be usable. I found note 1500666 which says that pattern matching is not supported in MDX and to use BEX query variables instead.
I have created a bex query with a variable which has "Variable Represents" set to "Selection Option". I can run this query and using the search option I can do a pattern match search. I have built a universe based on this query but the filter that gets created automatically in the universe uses a "Between" operator.
Does anyone know if it is possible to change the definition of the filter in the universe so that it does a pattern match search and if so how?
The end result is that I would like to be able to do a pattern match search on the text description of a BW employee object.
Thanks
Quentin.
It would be better if you post the Filter definition here...
And why don't you do Pattern matching at BO query panel level??
Where you can find Matches pattern operator to do same stuff.
Thank You!!
Similar Messages
-
OLAP Universe - Filter Expression
Hello,
Can anyone help me in how to write below filter expression in OLAP universe filter expression:
(PeriodType NOT IN (0,2) or EntryPeriod=(CASE when Company in ('PH','AU') THEN '200800'
when Company in ('AE','BR') THEN '201000'
when Company ='LV' THEN '201100'
END)) and (Journalcode NOT IN ('YTI','PROD'))
and SubledgerTypeCode = 2 AND LetteringDate IS NULL
and EntryDate <= @Prompt('Please Select as on Entry Date','d',,MONO,FREE)
Your help on this will highly be appreciated.
Thanks in advance!
Regards,
PallaviUse Aggregate() function in place of sum for the Rolling Calculation. Eg:
<EXPRESSION>Aggregate( {[0CALMONTH].CurrentMember:[0CALMONTH].CurrentMember.lead(@Prompt('Numb
er of Months','N',,mono,free))},@Select(Measures\Amount))</EXPRESSION>
Regards,
Rohit -
BW OLAP universe object with Aggregate
How to create an BW OLAP universe object with Aggregate to a higher level than the underlying query?
The objective is to synchronize 2 queries by Contract Agreement quantity range and part of the calculation is to obtain the contract total quantity in one of the queries that is by Year and Month. For that query I need the total quantity for the contract.
Example;
Contract # Year Month Qty
1 2011 1 230
6 2011 2 50
14 2011 3 124
u2026
25 2011 12 87
Total Qty --> ?
The following syntax gives the total quantity by contract / Year / Month, not the overall contract quantity. I could not find any MDX reference to use to solve this.
The dimension is [0SALESDEAL].[LEVEL01]
<EXPRESSION> AGGREGATE({[0SALESDEAL].CurrentMember:[0SALESDEAL].CurrentMember},[Measures].[DBKTD232QCONV8CVZYB17B5P0]) </EXPRESSION>
Thanks,
Marco
Edited by: Marco R on Dec 6, 2011 3:25 AM
Edited by: Marco R on Dec 6, 2011 3:27 AM
Edited by: Marco R on Dec 6, 2011 3:31 AM
Edited by: Marco R on Dec 6, 2011 3:33 AM
Edited by: Marco R on Dec 6, 2011 3:35 AMHi Andrew,
Looking at your statement I get the feeling you want this as a dimension/characteristic.
Since an expression has to be numeric and a characteristic in BW cannot be numeric, this will not work.
Only measures/keyfigures are possible.
The direction from SAP is to push any modeling to the BW query or even BW itself.
Hope this helps,
Marianne -
OLAP Universe Filter for Constant
Hello
I am trying to create a universe filter. We have a BO OLAP Universe on top of MSAS 2008. We are at BOXI 3.1 SP2/FP2.2
<FILTER KEY="[Date].[Calendar Date].[Date]"><CONDITION
OPERATORCONDITION="InList"><CONSTANT
CAPTION="[Today].item(0).MEMBER_CAPTION"/></CONDITION></FILTER>
Where [Today] is a calculated member.
This one parses fine, however when it comes to MDX which i capture via
profiler
WITH SET NS28B9BE741FD446A5A0414EA718F8FC_0 AS Filter([Date].[Calendar
Date].levels(4).allmembers,((([Date].[Calendar
Date].currentmember.properties("CAPTION")="[Today].item
(0).MEMBER_CAPTION"))))
SELECT { [Measures].DefaultMember } ON COLUMNS ,
NS28B9BE741FD446A5A0414EA718F8FC_0 DIMENSION PROPERTIES
MEMBER_UNIQUE_NAME, MEMBER_CAPTION ON ROWS FROM [My Cube]
This returns empty. However it works fine and returns value if i remove "" wrapping
[Today].item(0).MEMBER_CAPTION and run this query in SQL Server Management Studio ( MDX query)
However i cannot introduce the same in the filter - if i try it gives
me a parse error.
i.e the following doesnt help
<FILTER KEY="[Date].[Calendar Date].[Date]"><CONDITION
OPERATORCONDITION="InList"><CONSTANT
CAPTION=[Today].item(0).MEMBER_CAPTION/></CONDITION></FILTER>
Can you kindly advise if you have seen similar errors and what i can do possibly in this case to workaround this?
Edited by: ramaks on Oct 26, 2010 2:35 AM
Edited by: ramaks on Oct 26, 2010 2:36 AM
Edited by: ramaks on Oct 26, 2010 2:37 AMHi Didier,
Thank you for your response. That was exactly my original design - but it has performance implications for us. Please see an earlier thread of mine.
Query Performance in OLAP MSAS Universe using Filter
In this Case the MDX will become as below.
Which means every additional dimension i add creates multiple cross joins, and the filter will go through all possible cross-join combination to filter out that one record for that particular date. My original thread explains this more clearly.
Is there no other way to implement such a filter?
WITH
MEMBER [Measures].[2FF3DF31-5D02-4A9B-A8,BC,E7,25,C2,30,1B,61] AS
IIF
[Date].[Calendar Date].CurrentMember.Properties("CAPTION")
=
[Today].Item(0).Member_Caption
,1
,0
SELECT { [Measures].DefaultMember } ON COLUMNS ,
,NON EMPTY
Filter
CrossJoin
AddCalculatedMembers
[Date].[Calendar Date].[Date].MEMBERS
[Measures].[2FF3DF31-5D02-4A9B-A8,BC,E7,25,C2,30,1B,61] = 1
DIMENSION PROPERTIES
MEMBER_UNIQUE_NAME, MEMBER_CAPTION ON ROWS FROM [My Cube]
Edited by: ramaks on Oct 26, 2010 4:26 PM -
RegEx, need help with pattern matching
im going thru a list of Strings...and id like to match some input to it..but the tutorial for regex wont let me find a smaller string within a bigger one if it exists
for example i have a String "java.sun.com" and i want to find "sun" or "java" or "com" or "jav" or ".co"
i think the only way regex will work is if i group the entire thing into
any ideas on how i can manipulate the string into a proper regex pattern so that itll find any of those "searches"
thanksNo, that is not correct. A regex can be constructed to return a match on anything you want. A single character, a newline character, a numeric character and any combination of them. There are limitless possibilities for pattern matching.
See here:
http://java.sun.com/j2se/1.4.1/docs/api/java/util/regex/Pattern.html
Any of the patterns may be compiled into a regex for searching using the matcher.
An alternative is to use the indexOf method of the string class to find what you are looking for.
Example:
String myString = "java.sun.com";
String matchThis = "n.co";
int patternFoundAtThisIndexPosition = myString.indexof(matchThis);patternFoundAtThisIndexPosition will be 7;
or simply:
int index = myString.indexof("sun");index will be 5; -
Search and replace, with pattern matching using a table
I need to inspect a data stream and standardise a set of codes. I need to
1. Match any patterns with a dash character and remove the dash and any following characters, eg BN-S -> BN, BN-SH -> BN, ARG-22 -> ARG, etc.
2. Make a few specific word for word replacements, eg, PAEDSH -> PAED
This is easy to hard code but can it be done using a table of regex substitutions? Can anyone give a pointer or link to some example code? The couple of regex replacement examples I've found use regex to locate but hard code substitutions.
ThanksYou could store all your patterns in a Map. Then iterate over the map inserting the patterns into a regex.
-
Hello, I am using Vision Development Module 8.5 with VB6. I need immediate help on coming up with a solution for an auto warranty return for incomplete "Fog Lamp" indicator symbol. I use a match score minumum of 900, but the match score returns a 932. I don't see how a score > 900 is returned for so much missing from this symbol. I use this test in a high production line and am very concerned. I attached a Vision Assistant 8.5 script and actual image from auto warranty return. The *.png template used for comparison is also in zip file.
Thanks
Attachments:
PatternMatchScrpt-FogLamp.scr 2 KB
Images.zip 137 KBGolden Template does exist in 8.5, and that was my first idea too, however, after trying it, it might not be the best algorithm for it.
Golden Template compare the contour of objects, and they don't produce very good result in the specific image because the symbols are relatively small and not contrasted enough once we look at the luminance plane (i.e. we can't perform a great contour extraction).
What I tried and works decently is the looking at the identification score of the classification algorithm.
The only drawback of this method is that the object needs to be whole (i.e you might need to do a little morphology to close the objects). But the identification score will be quite different on the partial fog lamp.
Another tactic, which is similar to the previous one is to (mis)use the OCR algorithm to train the object and use the character verification function (i.e. define a perfect fog lamp image (character) as the reference character when you train the OCR engine.
The algorithm will them return a verification score which will tell you how far or close the pattern under inspection is from the reference one defined in the OCR file. OCR is based on classification.
After trying that on your image, the verification score is different enough and you could use that for making a decision, but the difference is not as marked as with using the identification score of the classification algorithm.
Both algorithms are based on thresholding the image. One advantage of using the OCR is that you can tweak the min character spacing parameter to adjust the segmentation so that the symbol is considered one full object (as opposed to having to perform morphology to do it if you use the classification algorithm).
As I mentioned, classification seems to give you a better differentiation between the scores.
Both methods allow you to define a Classification file or Character Set File that allow you to test multiple symbols.
I am attaching a couple inspections and files I used to do this quick test.
Hope this helps.
Best regards,
Christophe
Attachments:
Fog Lamp Inspection.zip 156 KB -
Help needed with pattern matching (analytics SQL ?)
Hello Forum Users,
I've got a curious problem on my hands that I am unable to think of an efficient way to code in Oracle SQL ....
(1) Background
Two tables :
MEASUREMENTS
ID NUMBER
M1 NUMBER
M2 NUMBER
M3 NUMBER
M4 NUMBER
INTERESTING_VALUES
ID NUMBER
M1 NUMBER
M2 NUMBER
M3 NUMBER
M4 NUMBER
(2) OUTPUT NEEDED
For each row in "MEASUREMENTS", count the number of matches in "INTERESTING_VALUES" (all rows). Please note that the matches might not be in the same column.... e.g. for a given row MEASUREMENTS M1 might match INTERESTING_VALUES M3.
I need to count 2,3 and 4 matches and provide the count values seperatley.
I am not interested in fuzzy matching (e.g. "greater than" or "less than"), the numbers only need to match exactly.
(You can use features up to 11g).
Thank you for your help.yup here you go...
SQL> select * from measurement;
ID M1 M2 M3 M4
1 30 40 110 120
2 12 24 175 192
3 22 35 147 181
SQL> select * from interesting;
ID M1 M2 M3 M4
1 16 171 30 110
2 40 171 30 110
5 181 147 35 22
4 175 12 192 24
3 175 86 192 24
SQL> SELECT id,
2 SUM(
3 CASE
4 WHEN LEN=1
5 THEN 1
6 ELSE 0
7 END) repeat2,
8 SUM(
9 CASE
10 WHEN LEN=2
11 THEN 1
12 ELSE 0
13 END) repeat3,
14 SUM(
15 CASE
16 WHEN LEN=3
17 THEN 1
18 ELSE 0
19 END) repeat4
20 FROM
21 (SELECT id,
22 spath ,
23 (LENGTH(spath)-LENGTH(REPLACE(LOWER(spath),',') ))/ LENGTH(',') LEN
24 FROM
25 (SELECT t.* ,
26 ltrim(sys_connect_by_path(cvalue,','),',') spath
27 FROM
28 (SELECT p.*,
29 row_number() over (partition BY id, id1 order by cvalue) rnum
30 FROM
31 (SELECT m.id,
32 m.m1 ,
33 m.m2 ,
34 m.m3 ,
35 m.m4 ,
36 (SELECT COUNT(*)
37 FROM interesting q
38 WHERE q.id=I.id
39 AND (q.m1 = column_value
40 OR q.m2 =column_value
41 OR q.m3 =column_value
42 OR m4 =column_value)
43 ) cnt ,
44 column_value cvalue,
45 i.id id1 ,
46 i.m1 m11 ,
47 i.m2 m21 ,
48 i.m3 m31 ,
49 i.m4 m41
50 FROM measurement m ,
51 TABLE(sys.odcinumberlist(m1,m2,m3,m4)),
52 interesting I
53 ORDER BY id,
54 id1 ,
55 cvalue
56 ) p
57 WHERE cnt=1
58 ) t
59 WHERE level >1
60 CONNECT BY prior id=id
61 AND prior id1 =id1
62 AND prior rnum <=rnum-1
63 --start with rnum=1
64 ORDER BY id,
65 id1 ,
66 cvalue
67 )
68 ORDER BY 1,2
69 )
70 GROUP BY id
71 ORDER BY 1;
ID REPEAT2 REPEAT3 REPEAT4
1 4 1 0
2 9 5 1
3 6 4 1I am posting the code without number formatting so that it gets easier for you to copy the code...
select id,sum(case when len=1 then 1 else 0 end) repeat2,sum(case when len=2 then 1 else 0 end) repeat3,sum(case when len=3 then 1 else 0 end) repeat4 from
(select id,spath,(LENGTH(spath)-LENGTH(REPLACE(LOWER(spath),',') ))/ LENGTH(',') len from
(select t.*
,ltrim(sys_connect_by_path(cvalue,','),',') spath
from (select p.*,row_number() over (partition by id, id1 order by cvalue) rnum from (SELECT m.id,
m.m1 ,
m.m2 ,
m.m3 ,
m.m4 ,
(SELECT COUNT(*)
FROM interesting q
WHERE q.id=I.id
AND (q.m1 = column_value
OR q.m2 =column_value
OR q.m3 =column_value
OR m4 =column_value)
) cnt ,
column_value cvalue,
i.id id1 ,
i.m1 m11 ,
i.m2 m21 ,
i.m3 m31 ,
i.m4 m41
FROM measurement m ,
TABLE(sys.odcinumberlist(m1,m2,m3,m4)),
interesting I
order by id,id1,cvalue
) p where cnt=1
) t where level>1
connect by prior id=id and prior id1=id1 and prior rnum<=rnum-1
order by id,id1,cvalue) order by 1,2) group by id order by 1Ravi Kumar
Edited by: ravikumar.sv on Sep 15, 2009 3:54 PM -
Problems with pattern matching Regular expression
String emailRegEx = "(\\w+)@(\\w+\\.)(\\w+)(\\.\\w+)*";
String test = "[email protected]";
if(test.matches(emailRegEx)) {
}throws an exception
java.util.regex.PatternSyntaxException: Illegal repetition near index 5.It works fine for me.
-
Hi people,
I'm having a slight problem with pattern matching. What I need to do is find if my pattern is a given string an return the end index.
Here's my string:
<TD>Some text</TD>
I need to find everything between the 2 anchor tags. (In this case "Some text"). The query string parameters are the only thing that can change.
Here's what I've tried:
Pattern pattern = Pattern.compile("<a href=\"/cgi-bin/dir/program.cgi?PARAM1=[0-9]&PARAM2=[0-9]*\"onmouseover=\"window.status='';return true;\">");
Matcher matcher = pattern.matcher(myString);
if ( matcher.find() ) {
System.out.println(matcher.end());
System.out.println(myString.substring(matcher.end(), myString.toLowerCase().indexOf("</a>",matcher.end())));
}Of course I've tried a lot of other things. I've also googled to try to find some examples but to no avail.
Thanks for any help.Just change your Patterne. It will work. The '?' character is being considered as a pattern matching character, while you want it as it is. Use \\ before '?' character.
Pattern pattern = Pattern.compile("<a href=\"/cgi-bin/dir/program.cgi\\?PARAM1=[0-9]&PARAM2=[0-9]*\"onmouseover=\"window.status='';return true;\">");
Hope it helps. -
How to accelerate the processing time of pattern match
How to accelerate the processing time of pattern match
If my camera acquire an image in 50ms, but when we analyze this image with pattern match, we need about 300ms. Except using queue to seprate acquisition
and analysis to different loops, there is another way to directly accelerate the processing time of pattern match ? Maybe compact rio with FPGA ?
But I saw a paper in NI web, there is no this function in c-rio ?
Any suggersion will be very apperciated ~
Ricky
Attachments:
aa.png 65 KBHello,
what matching algorithm are you using? You can reduce time using the Gaussian pyramids algorithm.You can fine tune the parameters using the advanced options.
What is your template size/image resolution?
I suppose using a computer with better performance would also work...
Best regards,
K
https://decibel.ni.com/content/blogs/kl3m3n
"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful." -
How create filter in olap universe with MDX LIKE Function
Hi all
I need to create a filter in a olap universe with the LIKE MDX function.
Problem:
There is a dimension with account numbers whit 10 digits like this: 5683492703 and i need to create a filter whit all account numbers whit the number 7 in the sixth position in a olap universe.
How to do this?
Thanks allTry like this :
<FILTER KEY="[Level Object Definition]">
<CONDITION OPERATORCONDITION="Like">
<CONSTANT CAPTION="_____7*"/>
</CONDITION>
</FILTER>
Not sure if it is _ or ? to represent a single character. Try ? in place of _ if the above code doesn't work.
Regards -
Adding mandatory filter with own LoV to BW OLAP Universe
Dear all,
I want to add a own filter with custom LoV to a characteristics-filter in an OLAP Universe. This filter does not exist in the BEx Query, so I have to do it manually.
So when the prompt shows up in WebI, the User should be able to select the Values from the custom LoV, for example:
- Tokio
- London
- Paris
The filter has to be mandatory and Tokio should be preselected. I was testing some things with the filter-XML, but always got errors. Can somebody tell me how this works?
Thank you for help in advance!
B. WegnerHi,
There are a few steps involved, I would suggest approaching them one at a time.
First, try to set up a filter (condition in the universe) to only show data for Tokyo (no prompt). Ensure you can get this to work.
Next, try and turn this condition into a prompt, but just define the LoV in the prompt syntax, not a separate object. Check that this works.
Next, try and split out that LoV into it's own object that populates from the characteristic in the BEx query. This will be the tricky part (maybe), if possible, get a filter created in the BEx query (make sure it's set as 'ready for user input') so that you see how the LoV gets created.
As a last resort, have a look in the manual: http://help.sap.com/businessobject/product_guides/boexir31SP3/en/xi31_sp3_sap_olap_univ_en.pdf
Hope that helps. -
Trouble using a pattern match in the GO URL when the value starts with %
Hi guys,
We are trying to use a Go URL as follows:
[http://hostname.com:9704/analytics/saw.dll?Go&Path=/users/administrator/Test/TestReport&Action=Navigate&col1=TestReport.SUBJECT&op1=like&val1="%25D8D8%25"|http://hostname.com:9704/analytics/saw.dll?Go&Path=/users/administrator/Test/TestReport&Action=Navigate&col1=TestReport.SUBJECT&op1=like&val1="%25D8D8%25"]
Basically, we want to send the filter : SUBJECT like '%D8D8%' in the GoURL. However, the report that opens up does not fetch any rows because BI somehow messes up the clause by not recognizing the leading %25 (which is an escaped % character). Instead it resolves the %25D8D8%25 into something like �D8% .
As you can see, the %25 at the end however gets resolved correctly but somehow the one at the beginning gets clubbed with the leading D8 to give �.
Any idea, how to get BI to accept a leading escaped % character when doing a pattern match in the Go URL?I'm heading to the Apple Store in Danbury CT tomorrow to test out a MacBook Pro. I'll happily post what I like and dislike here.
Waiting for a MacBook Pro... Other OS -
Hi all,
After Cloning facing an issue
mod_security: Access denied with code 405. Pattern match "!(GET|HEAD|POST)"
and not able to get the login prompt
EBS: 12.1.3
DB:11G
Please help as this is urgent.
Regards,
Raj.Hi Hussein/Srini,
My OS details are as follows
Source OS : OE Linux 5X
Target : REHL
DB : 11.2.0.3
In my previous cloning the R12 login URL was not getting redirected to https from http. This backup was given by client last week and I completed the cloning and post cloning procedures without any error, but unable to login as the page is redirecting to https:/hostname:port/OA_HTML/AppsLogin.
I have done the following so far, but the issue is not getting resolved.
1) Generated JAR files using ADADMIN (Force)
2) Compiled JSP
3) Ran autoconfig multiple times without any error in both db and application tiers.
4) DB alert log did not have any error.
5) Executed relink all from APPL_TOP
6) Able to launch http://XXXXXXXXX:XXXX/forms/frmservlet?
Kindly help me out on this
Regards
Maybe you are looking for
-
Framemaker crashes on start up.
I have just recently downloaded and installed Frammaker9. So we can test it i dont really want to splash out £100's So any help here is much apprechiated. So after i installed it i got an error. And in that log file was this. === Header Begin === Int
-
No Form Fields Detected - Adobe Pro X
Hi all, Having a very frustrating time today and probably missing something simple. I have created a new PDF Form and also edited a previous Form that I have used. However, when uploading them into our software (proprietary), we get the error "No F
-
I need to reinstall acrobat 9 after having my mac hard drive wiped. I have the serial number but there isn't a download link on the adobe website
-
In day 4 when I finish section "Use an inline item renderer" and when I try to increase/decrease NumericStepper I get exception with this message: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.contro
-
The movie preview app that had a red chair as an icon has disappeared from my tool bar after upgrading to Mountain Lion. Does anyone know why this happened?