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

Support for Row Deletion Policy #302

Open
jstlaurent opened this issue Jan 19, 2023 · 0 comments
Open

Support for Row Deletion Policy #302

jstlaurent opened this issue Jan 19, 2023 · 0 comments
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jstlaurent
Copy link

Is your feature request related to a problem? Please describe.
We have a use case where some entities have a life cycle where they are created, kept alive through a polling mechanism, and then destroyed. In order to handle the case where the client fails to explicitly destroy an entity (through error, network failure, etc.), we have implemented a time-to-live feature that flags entities as stale once they have not received a keep-alive request beyond a certain delay. We currently have a scheduled event that calls a process to remove these stale entities.

Describe the solution you'd like
Cloud Spanner supports Row Deletion policies that would let us set the TTL directly in Spanner, without having to manage a scheduled process to do so. This requires adding SQL statements to the table declaration. We would like to be able to add these statements through the declarative __table_args__ field of our SQLAlchemy models, much like interleaving.

Describe alternatives you've considered
We can continue to run our scheduled process, but we would prefer to leverage the full capabilities of Spanner going forward.

Additional context
None.

@jstlaurent jstlaurent added priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jan 19, 2023
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. label Jan 19, 2023
@asthamohta asthamohta removed their assignment Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-sqlalchemy API. priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants