Given an input dataset consisting of JSON records (e.g. [{"a": 1, "b": ["hello", "world"], "c": "foo"}]), return the schema of the dataset (a is int, b is list of string, c is string), handling nested records.
Asked in the tech screen stage. Use the records belonging to dataset ID 1.
field_path, schema_type, and is_nullable.list of <type>.field_path ascending.| Column | Type | Description |
|---|---|---|
| dataset_idPK | INTEGER | Unique dataset identifier |
| dataset_name | VARCHAR(255) | Dataset name |
| Column | Type | Description |
|---|---|---|
| record_idPK | INTEGER | Unique record identifier |
| dataset_id | INTEGER | Referenced dataset identifier |
| payload | JSONB | JSON record payload |