Skip to content

Enable $out aggregation to push to time series collection. #4985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
christophstrobl opened this issue May 28, 2025 · 3 comments · May be fixed by #4995
Open

Enable $out aggregation to push to time series collection. #4985

christophstrobl opened this issue May 28, 2025 · 3 comments · May be fixed by #4995
Labels
in: aggregation-framework Aggregation framework support type: enhancement A general enhancement

Comments

@christophstrobl
Copy link
Member

see: https://www.mongodb.com/docs/v8.0/reference/operator/aggregation/out/#syntax

"timeseries": {
    "timeField": "<field-name>",
    "metaField": "<field-name>",
    "granularity" : \\ "seconds" | "minutes" | "hours" 
}
@christophstrobl christophstrobl added type: enhancement A general enhancement in: aggregation-framework Aggregation framework support labels May 28, 2025
@HyunSangHan
Copy link
Contributor

Can I contribute to this feature?

@christophstrobl
Copy link
Member Author

@HyunSangHan sure, a PR would be welcome.

HyunSangHan added a commit to HyunSangHan/spring-data-mongodb that referenced this issue Jun 4, 2025
Extend OutOperation to support MongoDB time series collections with
configurable time field, metadata field, and granularity options.
Reuse existing Granularity enum and TimeSeriesOptions class for consistency.

- Add timeseries() methods to OutOperation for fluent API
- Add static factory methods outToTimeSeries() to Aggregation class
- Support both simple and extended $out syntax for time series
- Include comprehensive test coverage with 9 new test cases

spring-projectsGH-4985
HyunSangHan added a commit to HyunSangHan/spring-data-mongodb that referenced this issue Jun 4, 2025
Extend OutOperation to support MongoDB time series collections with
configurable time field, metadata field, and granularity options.
Reuse existing Granularity enum and TimeSeriesOptions class for consistency.

- Add timeseries() methods to OutOperation for fluent API
- Add static factory methods outToTimeSeries() to Aggregation class
- Support both simple and extended $out syntax for time series
- Include comprehensive test coverage with 9 new test cases

spring-projectsGH-4985
@HyunSangHan
Copy link
Contributor

@christophstrobl I just submitted a pull request. #4995

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: aggregation-framework Aggregation framework support type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants