aggregation

How Camel 2.11 batch aggregation works with separate route?

回眸只為那壹抹淺笑 提交于 2019-12-30 09:55:35
问题 First there is a similar unanswered question Joining routes into single aggregator We have some consumer routes (ftp, file, smb) reading files from remote systems. Simplified for test with direct route, but similar behavior with batch consumers: from("direct:"+routeId).id(routeId) .setProperty(AGGREGATION_PROPERTY, constant(routeId)) .log(String.format("Sending (${body}) to %s", "direct:start1")) .to("direct:aggregate"); After transformation all results from one poll are aggregated by batch

UML Notation - Aggregations/Compositions vs “Vanilla” Associations

泪湿孤枕 提交于 2019-12-29 04:58:09
问题 I've recently spent a good deal of time performing detailed UML designs of various SW components that I have since written. Looking back on what I have recently finished and comparing that to when I first learned UML, I see that I now almost strictly use Aggregation and Composition relationships, and have virtually abandoned "vanilla" non-directed/directed relationships. I still of course use Generalizations and Realizations, but these are distinctly different than those above and are not

Count Number of Consecutive Occurrence of values in Table

拈花ヽ惹草 提交于 2019-12-28 12:01:15
问题 I have below table create table #t (Id int, Name char) insert into #t values (1, 'A'), (2, 'A'), (3, 'B'), (4, 'B'), (5, 'B'), (6, 'B'), (7, 'C'), (8, 'B'), (9, 'B') I want to count consecutive values in name column +------+------------+ | Name | Repetition | +------+------------+ | A | 2 | | B | 4 | | C | 1 | | B | 2 | +------+------------+ The best thing I tried is: select Name , COUNT(*) over (partition by Name order by Id) AS Repetition from #t order by Id but it doesn't give me expected

Assigning a template-generated class to a C struct with the same layout

心不动则不痛 提交于 2019-12-25 14:13:37
问题 If I understand correctly, the object ’A’ defined thus: typedef struct { int n; float *p; } myStruct; myStruct A; is an aggregate with exactly the same layout in memory as the object ‘B’ defined as: template <typename T> class myTemplateClass { public: int n; T* p; }; myTemplateClass<float> B; So, is there a more elegant way of assigning A = B; than having to write A = *(reinterpret_cast< myStruct *>(&B)); every time? My reason for asking is that I have to call a library function which

How do I calc a total row using a PIVOT table, without UNION, ROLLUP or CUBE?

五迷三道 提交于 2019-12-25 12:37:10
问题 Can someone help out with calculating a total row at the bottom of this PIVOT table please? select *, [Drug1] + [Drug2] + [Drug3] + [Drug4] + [Drug5] as [Total] from (Select [id], [drug], [Diagnosis] from DrugDiagnosis ) as ptp pivot (count(id) for drug in ([Drug1], [Drug2], [Drug3], [Drug4], [Drug5]) ) as PivotTable I know I can do it with a UNION and have a separate query to calc the totals, but that will double the hit on the database. I have found examples using ROLLUP and CUBE, but these

How to make Xcode Run Script x86_64 compatible

南笙酒味 提交于 2019-12-25 08:56:37
问题 Hello hello community! So here is my issue, welll not really an issue but the following Run Script compiles my static library and it works great! my only issue is that it doesnt compile it for the simulator and i get a x86_64 error. I know that i could just edit this code to make it compatible can someone tell me what i need to do?? # define output folder environment variable UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal # Step 1. Build Device and Simulator versions

How to plot aggregated data in kibana

放肆的年华 提交于 2019-12-25 07:21:36
问题 I'm a newbie to kibana. I have following data stored in ES: { "_index": "test", "_type": "impressions", "_id": "AVZ4QLgkLqvQLIzbvF4e", "_version": 1, "_score": 1, "_source": { "campaign_id": "1011", "count": 691, "played_dt": "2016-01-02" } } So, basically I have counts per campaign_id which is already aggregated data. I want a simple bar chart which plots counts per campaign_id where X axis is campaign_id and Y axis is it's count. I'm getting hits for that specific campaign_id as unique

Sum of Max in PivotTable for Excel

情到浓时终转凉″ 提交于 2019-12-25 07:01:12
问题 I have a PivotTable that comes from the following table: +---------+---+-----+ | A | B | C | +-+---------+---+-----+ |1| Date |Id |Value| +-+---------+---+-----+ |2|4/01/2013|1 |4 | +-+---------+---+-----+ |3|4/01/2013|2 |5 | +-+---------+---+-----+ |4|4/01/2013|1 |20 | +-+---------+---+-----+ |5|4/02/2013|2 |20 | +-+---------+---+-----+ |6|4/02/2013|1 |15 | +-+---------+---+-----+ And I want to aggregate first by Id and then by Date, using Max to aggregate by Id and then Sum to aggregate by

Aggregating 10 minute data to hourly mean with the hourly.apply function fails

不羁岁月 提交于 2019-12-25 02:53:39
问题 I have a file with date/time data and its measured values for said date and time. The values were measured every ten minutes for the course of one month, and I am attempting to do a time series analysis eventually. Before that however, I wanted to aggregate the 10 minute intervals to hourly intervals by calculating the mean measurement of every 60 minutes. Here is a sample of my data(a total of 4319 observations): Date/Time Value 2013-01-01 00:00:00 31,439999 2013-01-01 00:10:00 33,439999

Reference another Aggregate Root inside another Aggregate root?

馋奶兔 提交于 2019-12-25 01:45:21
问题 I'm done DDD for a couple of years now and still its challenging when it comes to designing Aggregates. Thats the fun part of DDD and it makes your head spin. I'm asking this question since I'm architect in a project and we're in the middle of designing the model. Its an iteration when model evolves parallel with GUI and requirement gathering together with customer. Now to the problem. Our scenario is that we are facing some Aggregates that are growing into very large AR's. I think I'm good