algolia / algolia-csv-js Goto Github PK
View Code? Open in Web Editor NEWCSV toolbox CLI written in javascript
CSV toolbox CLI written in javascript
I have an array column and sometimes it has a single value.
[0]
the script treats it as a string.--parse-arrays=column
that it creates an array column with [0]
as a string value, .e. ["[0]"]
.0
and --parse-arrays=column
it throws an error because it does not find a comma0,
and --parse-arrays=column
it creates an array like this ["0",""]
Hence it seems not possible to upload arrays with a single value.
I have CSV files that could have some fields changed on a daily basis but ultimately the record is still the same. if I were to use this tool how would it handle trying to upload the same data again but with slightly different values, same primary ID though?
CSV upload in Algolia dashboard does not allow to upload nested hierarchical data. The documentation says there is no agreed format for nesting data in CSV.
However, would you consider this tool to allow selecting columns which contain JSON to be uploaded as-is. E.g. you have a CSV in tabular format and then specific columns to be parsed as raw nested structures and be sent to Algolia like that.
What do you think?
name | brand | categories |
---|---|---|
Foo | Acme | {"lvl0": "Home", "lvl1": "Seating", "lvl2": "Chairs"} |
Hello, I've found this tool really useful. However I git stuck while trying to upload a CSV with cell values starting with #
. I'm assuming it's being read as #ERROR.
Here's the stack trace:
Reading from file : buildings_sg.csv
Parsing CSV
Clearing data in index
Saving to algolia
Saving to algolia
Saved/updated 10000 records
Saving to algolia
events.js:183
throw er; // Unhandled 'error' event
^
Error: Number of columns on line 36459 does not match header
at Parser.__push (/Users/martinverdejo/.nvm/versions/node/v8.9.4/lib/node_modules/algolia-csv/node_modules/csv-parse/lib/index.js:272:14)
at Parser.__write (/Users/martinverdejo/.nvm/versions/node/v8.9.4/lib/node_modules/algolia-csv/node_modules/csv-parse/lib/index.js:496:20)
at Parser._transform (/Users/martinverdejo/.nvm/versions/node/v8.9.4/lib/node_modules/algolia-csv/node_modules/csv-parse/lib/index.js:207:14)
at Parser.Transform._read (_stream_transform.js:186:10)
at Parser.Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:387:12)
at writeOrBuffer (_stream_writable.js:373:5)
at Parser.Writable.write (_stream_writable.js:290:11)
at ReadStream.ondata (_stream_readable.js:639:20)
at emitOne (events.js:116:13)
My row 36459 looks like the following:
# 1 LOFT | 398614 | # 1 LOFT | 1.31276346405246 | 103.883518875617 | 33586.8152234554 | 32784.2877238821
Is there a way to escape this and similar strings?
nicksav$ algolia-upload appid key assets /Users/{user}/Documents/assets.csv --geo-colums="latitude","longitude"
It is adding columns, but not creating _geo field.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.