Skip to content

Add sanity check to import #7

Description

@chrisbartley

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions