Split a batch of ingested records into valid rows and rejects. A record is valid when every required field is present, non-null, and of the declared type.
bool is not an acceptable intschema{"id": "int", "name": "str"}records| id | name |
|---|---|
| 1 | a |
| x | b |
| 3 | null |
[
[{"id": 1, "name": "a"}],
[{"field": "id", "reason": "type", "record": {"id": "x", "name": "b"}}, {"field": "name", "reason": "missing", "record": {"id": 3}}]
]schema{"id": "int", "name": "str"}records| id | name |
|---|---|
| null | a |
[
[],
[{"field": "id", "reason": "missing", "record": {"id": null, "name": "a"}}]
]Community-reported interview topic. Not an official company question and no affiliation is implied.
Run against the public tests, or submit to score against all of them.