<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 04:45:05 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-37136] $bucketInterval for grouping data in intervaled buckets (eg. time series)</title>
                <link>https://jira.mongodb.org/browse/SERVER-37136</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The following StackOverflow question and answer raises the issue and provides a solution for this feature.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/24636209/resample-time-series-data-using-javascript-and-mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Resample Time Series Data using Javascript and Mongodb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;In addition of creating a bucket with predefined&#160;boundaries ($bucket), or one with autogenerated&#160;boundaries&#160;($bucketAuto), it would be helpful to have a bucket stage which is given an upper and lower boundary, and the buckets are generated automatically at fixed, predefined intervals, for example&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;{{{}}&lt;br/&gt;
&lt;tt&gt;&#160; $bucketInterval: {&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; groupBy: &apos;$timestamp&apos;,&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; }}{{lower: ISODate(&quot;2014-10-23T00:00:00.000+02:00&quot;),&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; }}{{upper: ISODate(&quot;2014-10-24T00:00:00.000+02:00&quot;),&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; }}{{interval: 5*60*1000,&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; }}{{output: {&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; &#160;&#160;&lt;/tt&gt;&lt;tt&gt;total:&#160; &#160; {$sum: 1},&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; &#160;&#160;&lt;/tt&gt;&lt;tt&gt;incoming: {$sum: &quot;$i&quot;},&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; &#160; outgoing: {$sum: &quot;$o&quot;},&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; &#160; }}{&lt;/tt&gt;&lt;br/&gt;
{{&#160; }}}&lt;br/&gt;
&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="604844">SERVER-37136</key>
            <summary>$bucketInterval for grouping data in intervaled buckets (eg. time series)</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-integration">Backlog - Query Integration</assignee>
                                    <reporter username="danielfaust">Daniel Faust</reporter>
                        <labels>
                            <label>qi-timeseries</label>
                    </labels>
                <created>Fri, 14 Sep 2018 12:53:26 +0000</created>
                <updated>Wed, 27 Dec 2023 16:35:08 +0000</updated>
                                                                            <component>Aggregation Framework</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2010442" author="david.storch" created="Fri, 21 Sep 2018 15:22:37 +0000"  >&lt;p&gt;One nice way to achieve this might be to allow the existing &lt;tt&gt;$bucket&lt;/tt&gt; stage to accept an expression, and expressing the boundaries with &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/range/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$range&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="2006401" author="danielfaust" created="Tue, 18 Sep 2018 13:58:58 +0000"  >&lt;p&gt;And maybe also an `inclusiveUpper: true|&lt;ins&gt;false&lt;/ins&gt;`, maybe also add `inclusiveLower : &lt;ins&gt;true&lt;/ins&gt;|false`&lt;/p&gt;

&lt;p&gt;For example, if `lower = 0`,&#160;`upper = 17` and `interval = 5`, then&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;ASC &#8211; would result in [0-5),[5-10),[10-15),&lt;span class=&quot;error&quot;&gt;&amp;#91;15-17*&amp;#93;&lt;/span&gt;*&#160;(17 included in last bucket) and&lt;/li&gt;
	&lt;li&gt;DESC &#8211; in [0,2),[2,7),[7,12),&lt;span class=&quot;error&quot;&gt;&amp;#91;12,17*&amp;#93;&lt;/span&gt;*&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="2006396" author="danielfaust" created="Tue, 18 Sep 2018 13:53:55 +0000"  >&lt;p&gt;Also a growth direction would be useful. `growth: &lt;ins&gt;ASC&lt;/ins&gt;|DESC`.&lt;/p&gt;

&lt;p&gt;For example, if `lower = 0`,&#160;`upper = 17` and `interval = 5`, then&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;ASC &#8211; would result in [0-5),[5-10),[10-15),[15-17) and&lt;/li&gt;
	&lt;li&gt;DESC &#8211; in [0,2),[2,7),[7,12),&lt;span class=&quot;error&quot;&gt;&amp;#91;12,17)&#160; (starts at 17 and goes down) ( or&#160;(0,2&amp;#93;&lt;/span&gt;,(2,7],(7,12],(12,17] ? )&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="2003701" author="nick.brewer" created="Fri, 14 Sep 2018 20:36:00 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=danielfaust&quot; class=&quot;user-hover&quot; rel=&quot;danielfaust&quot;&gt;danielfaust&lt;/a&gt; Thanks for your request - I&apos;ve passed this along to our Query team for consideration. &lt;/p&gt;

&lt;p&gt;-Nick&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25467"><![CDATA[Query Integration]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 14 Sep 2018 20:36:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 20 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ted.tuckman@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 20 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-integration</customfieldvalue>
            <customfieldvalue>danielfaust</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>nick.brewer</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu81nj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2gh3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hu7nwv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>