How to count unique entries accross the data grid?
So I have managed to put a bunch of data into a partitioned cache 3 nodes.
And now I would like to perform the following query/calculation.
Say I have the following model...
Person
firstName
lastName
phoneNumber
creditCard
email
ipAddress
Given a person's email, count unique phoneNumbers, ipaddresses and creditCards.
Or
Given a person' s credit card count how many unique phonenumber, emails and ipAddresses.
That said if we have the follwoing data...
John Smith - [email protected] - 555-555-5555 - 1234567890000000 - xxx.xxx.xxx.xxx
John Smith - [email protected] - 999-555-5555 - 1234567890000000 - xxx.xxx.xxx.yyy
John Smith - [email protected] - 777-555-5555 - 1234567890000000 - xxx.xxx.xxx.yyy
For query 1 given [email protected] I should get back
1 unique phoneNumber
1 unique creditCard
2 unique ips
For query 2 given 1234567890000000
3 unique phoneNumbers
2 unique emails
2 unique ips
Is possible through a regular query?
Basically it's a cross reference algorithm.
Edited by: 884647 on Sep 27, 2011 8:33 AM
Edited by: 884647 on Sep 27, 2011 8:37 AM
Just found this in a thread...
Filter filter = ....
ValueExtractor email = new ReflectionExtractor("email");
ValueExtractor phone = new ReflectionExtractor("phonenumber");
ValueExtractor ip = new ReflectionExtractor("phonenumber");
Map mapResult = cache.aggregate(filter, new CompositeAggregator(new EntryAggregator[] {new ReducerAggregator(email), new ReducerAggregator(phone), new ReducerAggregator(ip)});
Seems like the right solution and this works across a partitioned cache?
Similar Messages
-
How to determine # of recs in the data grid - with filter being used
Say I'm looking at table or view that has 10,000 rows. I put a filter on the filter line such as state = 'WA'. Let's say the data grid (where I see the data clicking the 'data' button) now has 2,500 rows with the filter in effect.
So, how do I tell how many rows are in the data grid now? I can see how to retrieve the total number of rows for the table or view, but how when a filter is in effect.
Thanks.Okay thanks.
Sure would have preferred to see (dare I say ... like TOAD) where you can just right click in the data grid and choose record count.
But thanks - I'll use the COUNT method (till of course it's added 8-)
Russ -
I would like to create a formula to accomplish a task, I am not sure how to do it.
Basically, I will have cells A1-A31, with 1 corresponding with a day of the month.
Each cell A1-A31 will contain HEX data, in the form of a name (ie: John Smith) I would like another cell such as A5 to count the unique entries within the range of A1-A31.
If I can be pointed in the right direction, I can figure out for corresponding cells.
Basically it will look like this (plus other calculations, I already achieved)
DATE NAME TOTAL_CASES
1 John Smith 1
2 John Smith 1
3 Roxy Jones 2
4 Huang Nguyen 3
5 Huang Nguyen 3
6 Bradly Katz 4
7 Linda Schutlz 5
8 off 5 <--- possible addition step of ignoring "off"
9 Julie Dawgie 6
Additionally, if there is a way to count the "unique entries" in the given range, it it possible to IGNORE an item, such as the word "off" and/or "vacation?The formula only appears to count the total number of "Y", but should be ignoring a second "Y" for that name.
Date
Claimant Name
hidden counter
sucessful?
days sucessful
days worked
days sucessful
days worked
Case%
Overall%
0
0
0
1
0
1
Brian
1
Y
1
1
2
1
200.000%
150.000%
2
Brian
0
Y
2
2
2
1
200.000%
150.000%
3
Octavio
1
N
2
3
2
2
100.000%
83.333%
4
Vicki
1
N
2
4
2
3
66.667%
58.333%
5
Octavio
0
N
2
5
2
3
66.667%
53.333%
6
Sara
1
N
2
6
2
4
50.000%
41.667%
7
Sara
0
N
2
7
3
4
75.000%
51.786%
8
Delfino
1
Y
3
8
4
5
80.000%
58.750%
9
Delia
1
Y
4
9
5
6
83.333%
63.889%
10
Vicki
0
Y
5
10
6
6
100.000%
75.000%
11
Cesar
1
Y
6
11
7
7
100.000%
77.273%
12
Larry
1
Y
7
12
8
8
100.000%
79.167%
13
Larry
0
Y
8
13
8
8
100.000%
80.769%
when counted correctly, it would look like:
Date
Claimant Name
hidden counter
Was Video Obtained?
Days Video Obtained
Days Worked
Cases Video Obtained
Cases Worked
Case%
Overall%
0
0
0
0
0
1
Brian
1
Y
1
1
1
1
100.000%
100.000%
2
Brian
0
Y
2
2
1
1
100.000%
100.000%
3
Octavio
1
N
2
3 -
How to find latest entry in the table according to time
how to find latest entry in the table according to the time
is there any function module to do so
\[removed by moderator\]
Regards
Shashi
Edited by: Jan Stallkamp on Aug 25, 2008 4:39 PMHi,
If you want to read the entry from an internal table,
sort the internal table in the descending order by the time and
delete adjacent duplicates by comparing the fields other than time and the internal table will have the latest record.
Suggestion: instead of only time try to have one more field called date with the time combination
Regards,
Ramesh -
How to select alternate entries from the database table
Hi Experts,
can u help me, how to select alternate entries from the database table.
ThanksAs there is no concept of sequence (unless there is a field specifically included for the purpose), there is no meaning to "alternate" records.
What table do you have in mind, what data does it hold, and why do you want alternate records?
matt -
How to count Unique Values in BEx
Hi Guys,
Can anybody please let me know how to count unique values of a characteristic.
Thanx in advance
PeterI have a similar scenario. If i drill up on the characterstic that had a count of one in each record, the total number of records should be stay equal to the summarised results in the last screen.
Would someone know how to do that .
Arti -
How can I get rid of the dates and time on my Notes
How do I get rid of the dates and times on my Notes that appeared when I updated to 8?
Yes, it's seems like a poor design decision.
By putting the date on the line below the Note title in the Notes Index, the app shows half the number of notes per page AND if you have a large number of notes, it takes twice as long to stroll down.
I doubt the designer actually uses the app.
TSAW -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
Get the error "Make an entry" in the date field
Hallo Experts,
I have the following problem. I have a date filed with value help. In the Getter-Method, I inserted the following code to get a value help:
CALL METHOD CL_CRM_UIU_BT_DATE_TOOLS=>GET_DATE
EXPORTING
IV_ATTRIBUTE_PATH = ATTRIBUTE_PATH
IR_BTDATE = current
IR_MODEL_UTIL = me
RECEIVING
RV_VALUE = value
EXCEPTIONS
CONVERSION_ERROR = 1
* others = 2
so far is everything is ok, I can select my date in the field. But the problem is, if I select an other button without any funktion (no event) in the same viewset I get the error message: Make an entry in field "Date". By the way, the field date is a mandantoy field.
My intention is, that the entry of the date filed is still exist (without to save) if I push an other button to invoke an event.
Could anyone help me?
Best regards,
JohnHi,
You are only displaying the date in getter method. To set the date in the entity it should be done using set_property.
current->set_property( iv_attr_name = 'date field' iv_value = 'value' ).
Check whether the date is set in setter method. If not add the above code.
Regards,
Arun -
How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
be done through sharepoint desginer / out of the box.
thanks.Congratulate you got the solution by yourself. I am new to a
WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
calendar date selection did me a great favor. Cheers. -
I have installed the latest version of iOS in my ipad but forgot to backup the content, what should i do!!! I don't want my media and other data erased, how can i find back all the data in my ipad? I haven't restore ipad yet, so any others way can be use? Now my ipad is in recovery mode.
Once you are in Recovery Mode, it's too late to do any backup. I am afraid you are going to lose your data.
-
How can I resize and reposition the Date Created window for All windows?
When setting view options for a finder window set to list view, I cannot get column resizing or positioning to hold. When making those changes, the option for "All Windows" automatically shifts to "This window only" and it then does not hold.
How can I resize and reposition the Date Created column for All WIndows?Hi Harmz,
Try dragging this file to the Îesktop & reboot...
/Users/YourUserName/Library/Preferences/com.apple.finder.plist -
How to Add multiple entry to the group policy security filtering
How to Add multiple entry to the group policy security filtering
Is there any way we can add multiple entry to the Domain group policy Security filtering tab.Currently its not allowing to add more then one entry at a time.
Getting Error like "only one name can be entered,and the name cannot contain a semicolon.Enter a valid name"Hi
Are you trying to add more users or groups through Group Policy Management Security Filtering tab?
Try right clicking on the policy and then edit
Then in Editor Right click on the name of the policy and Properties
Security tab and add user or group from this tab. Just make sure if you are adding user or groups "Select this object type" has
the correct option also "From this Location" is set to your entire directory not the local server.
Update us with the above.
Thanks -
How can I install Itunes in the data drive and not in OS partition?
My PC has a 3 partitions and I hace installed Itunes in the OS partition, very small. How can I install Itunes in the data drive?
See Williams Lloyd's post > https://discussions.apple.com/message/15670671#15670671
-
How Sender SOAP Adapter will retriew the data to process further
How Sender SOAP Adapter will receive the data to send the integration server to process further
Hi,
1. All details are always taken from the Sender Agreement.
For the Sender File adapter and the Sender SOAP adapter , the details that include are , Sender Service, Sender Interface Name and namespace and these are the details that make up the SOAP header when the message hits the integration Engine.
Once the corresponding Adapter for the message is identified, ie. the Sender SOAP adapter , the message for the SOAP header is then taken from the Sender Agreement of that adapter. This is the exact reason why one Sender Adapter can be involved in one and only one Sender Agreement.
Regards
Bhavesh
Maybe you are looking for
-
Acrobat acrobat on taskbar in Win7 but files won't open - ?
Adobe Acrobat icon appears on task bar when trying to open a pdf file but the file is not open on the screen. (it worked fine yesterday and nothing has changed on my laptop).
-
My i phone 3gs is unlocked so can i update iso or will it lock back
my i phone 3gs is unlocked so can i update iso or will it **** back. and how do i find out whant network it started on
-
i upgrade ios 4 to ios 5.It is completed but when i try to restore all the apps back up before,at last it's written the apps cannot be found(all the apps).
-
How to authorise single Ereader device with several Adobe IDs?
Is it technically possible in Adobe's DRM system to connect a single epub ebook reader with several Adobe Digital Editions IDs? The background of my question is following: I got an ADE account and a laptop computer and Ereader authorised with that ac
-
History in txt file...on client location
I want to create a history file in a .txt file. and it's store on client location...if there r any solution plz share that.. thanx Wating ur +ve rply....