I’m getting an error attempting to import data with a CSV via Realm Studio.
My class has 5 property’s, _id (objectId), value (float), createdAt(date), timestamp(date) and unit(string).
My _id is an objectId, set as the Primary Key.
CSV:
_id,value,createdAt,timestamp,unit
62950a7fb786e7670db2b967,100,2022-05-25T04:25:13.489Z,2022-05-25T04:25:13.489Z,test
Error:
Failed to import data. Parsing error at line 0, expected type “objectId” but got “62950a7fb786e7670db2b967” for column “_id”. Error details: Error: Importing data of type “objectId” is not supported.
No problem, so I try importing without including that property, thinking Realm Studio would generate and I get:
CSV:
value,createdAt,timestamp,unit
100,2022-05-25T04:25:13.489Z,2022-05-25T04:25:13.489Z,test
Error:
Failed to import data Missing value for property ‘Glucose._id’.
So I figured I’d leave it null:
_id,value,createdAt,timestamp,unit
,100,2022-05-25T04:25:13.489Z,2022-05-25T04:25:13.489Z,test
Error:
Same as first one.
Is there a way to get Realm Studio to generate my objectId for me in the CSV? I haven’t been able to find anything in help to work around this.