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

time as primary_key #22

Open
feroda opened this issue Aug 5, 2021 · 1 comment
Open

time as primary_key #22

feroda opened this issue Aug 5, 2021 · 1 comment

Comments

@feroda
Copy link

feroda commented Aug 5, 2021

Hi all and thanks for this project.

I was wondering why TimescaleModel does not use the field as primary_key . Is this a choice left open to who implements his schema? If so, it would be better to integrate in documentation.

It makes sense: if I want all my iot endpoints writing in one big table the "time" field must not be a primary key, but if I have one table for each endpoint (this is my case now) setting the "time" filed as primary_key shoudl be the right choice.

What do you think?

TIA

@daadu
Copy link
Contributor

daadu commented Aug 17, 2021

ASAIK, you can set "time" as primary key - there are not limitation on TSDB end.

Not sure why does this module enforces it? @schlunsen can you give explanation for it?

@daadu daadu mentioned this issue Aug 17, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants