Skip to content
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

Init TimeSeries Collections #119

Closed
acrozes opened this issue Sep 24, 2021 · 3 comments
Closed

Init TimeSeries Collections #119

acrozes opened this issue Sep 24, 2021 · 3 comments
Labels

Comments

@acrozes
Copy link

acrozes commented Sep 24, 2021

Hello,

How to create TimeSeries Collection ?
https://docs.mongodb.com/manual/core/timeseries-collections/#create-a-time-series-collection

The mongo query as exemple:

db.createCollection(
  "weather24h",
  {
    timeseries: {
      timeField: "timestamp",
      metaField: "metadata",
      granularity: "hours"
    },
    expireAfterSeconds: 86400
  }
)
@roman-right
Copy link
Member

Hey @acrozes ,

Thank you for the issue.
Unfortunately, timeseries collection creation is not supported by Beanie yet. You can create it manually using motor syntax: https://motor.readthedocs.io/en/stable/api-asyncio/asyncio_motor_database.html?highlight=create_collection#motor.motor_asyncio.AsyncIOMotorDatabase.create_collection
And then use the collection name in the model Collection inner class.

It will be supported soon, but I have to finish some big updates before. I'll inform you here when it will be supported.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the Stale label Mar 23, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants