zoomie
zoomie11mo ago

csv loader (without convex mutation)

I'm trying to make a general csv loader, is there a way to do this without needing to write a mutation? The following comment is how I imagine it should work // Script loads a csv file into an empty convex table. // Create a new table in convex, pass this name as <table_name>. // It uses the names of the csv file columns as the column names in the table. // Usage: node scripts/load_csv.js <table_name> <csv_file_path>
2 Replies
Michal Srb
Michal Srb11mo ago
npx convex import already supports importing a CSV file to a table. Does that match your use case?
zoomie
zoomieOP11mo ago
Amazing! Worked like a charm

Did you find this page helpful?