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

[Question]Can STA check duplicate data? #1823

Open
mulderyu opened this issue Nov 27, 2023 · 1 comment
Open

[Question]Can STA check duplicate data? #1823

mulderyu opened this issue Nov 27, 2023 · 1 comment

Comments

@mulderyu
Copy link

If I POST two identical data, such as
{
"phenomenonTime": "2023-11-27T06:07:59Z",
"result": 13.24
}
can FROST-server avoid writing the same data twice ?

Currently, I have to check data manualy to prevent writing identical data

@hylkevds
Copy link
Member

hylkevds commented Dec 1, 2023

The standard makes no statements on dealing with duplicate data. What exactly constitutes a duplicate, and what should happen when one is found, can also be use-case specific, so currently checking for duplicates has to be done by the client.

It is possible to manually add a constraint to the observations table to check for duplicates, though that would currently result in a 500 "failed to store data" error, which is not the most useful.

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