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

Add sanity check to import #7

Open
chrisbartley opened this issue Nov 6, 2015 · 0 comments
Open

Add sanity check to import #7

chrisbartley opened this issue Nov 6, 2015 · 0 comments

Comments

@chrisbartley
Copy link
Member

Would be nice if import verified that each record array had N+1 items where N is the length of the channel_names array in the JSON.

Motivation: we had a user who forgot to include the timestamp in the record arrays, and so the datastore used the first value as the timestamp.

We'll need to discuss what action to take for something like the following:

{"channel_names":["foo", "bar", "baz"], "data":[
[1445624599,1,2,3],
[1445624600,4,5,6],
[7,8,9],
[1445624602,1,2,3]
]}

Do we reject the entire import, or just ignore the one line with the incorrect number of fields? I think I'd probably vote for the latter, especially if we can report the number of ignored records in the response.

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

1 participant