Import | Import numbers as string if the schema is v.string()
I have the following csv
"accountNumber","accountName" "0001","reserviert" "0040","reserviert"
accountNumber is v.string() in convex (to preserver the leading 0), so importing via npx convex import --table accounts accounts.csv fails because the importer tries to import accountNumber as v.number.
Failed to insert or update a document in table "accounts" because it does not match the schema: Value does not match validator.
Path: .accountNumber
Value: 1.0
Validator: v.string()
So instead I would expect that the importer tries to cast the values to the format of the field. Or at least treat everything as string and if the target field is of type v.number try to cast the string to number.
https://docs.convex.dev/database/import-export/import#single-table-import is the spec for the behavior.
Seems like there may be a bug here where the string is being interpreted as a number. You can work around it by using the json format.
Thanks for the report.