When importing data from CSV, Field defined as 'double?' got error "must be of type 'number?', got 'string'"
Closed this issue · 2 comments
Schema
{
name: 'products',
properties: {
category: 'string',
type: 'string?',
standard: 'string?',
bonnet_type: 'string?',
top_flange_standard: 'string?',
option_2: 'string?',
option_3: 'string?',
actuation: 'string?',
actuation_option_1: 'string?',
actuation_option_2: 'string?',
pn_pressure_rating: 'string?',
size: 'int?',
f2f_standard: 'string?',
f2f: 'double?',
c2s: 'double?',
c2b: 'double?',
fig_no: 'string?',
p_no: 'string?',
supplier: 'string?',
features: 'string?',
inlet_standard: 'string?',
inlet_connection: 'string?',
inlet_thread_or_solder_pipe_size: 'string?',
inlet_flange_diameter: 'int?',
inlet_flange_pcd: 'int?',
inlet_flange_no_holes: 'int?',
inlet_diameter_holes_or_thread_size: 'string?',
outlet_standard: 'string?',
outlet_connection: 'string?',
outlet_thread_type: 'string?',
outlet_flange_diameter: 'int?',
outlet_flange_pcd: 'int?',
outlet_flange_no_holes: 'int?',
outlet_diameter_holes_or_thread_size: 'string?',
top_standard: 'string?',
top_flange_diameter: 'int?',
top_flange_pcd: 'int?',
top_flange_no_holes: 'int?',
top_diameter_holes: 'int?',
top_bolt_or_stud_size: 'string?',
body_material: 'string?',
body_material_grade: 'string?',
trim_material: 'string?',
trim_material_grade: 'string?',
seal_material: 'string?'
}
}
Data
LANDING ANGLE,RIGHT ANGLE,,,,,,,,,,25,,,65.00,85.00,Fig JIS7334H,145325,ECONOSTO,,JIS 10K,FLANGED,,,,,,,,,,,,,,,,,,,BRONZE,,BRASS,,
NOTE: There are 10,000+ records in the csv file
This product is now deprecated. The replacement "Studio" can also import CSV files. Please see if that's still causing the same issue.
Thanks!
Oops, sorry I didn't mention that this actually came from Realm Studio.
I've managed to upload all of the data by adding a '@' symbol (such a primitive yet only way to converse type) in the beginning of every record, then manually delete them in the cloud.
Now I am looking for a way, in Realm js, to change the types of the schema's properties in a sync realm, but with no luck. Do you have any suggestions? (I sure will post this question on StackOverflow, but would like to ask here anyway)