Git Product home page Git Product logo

algolia-csv-js's People

Contributors

bobylito avatar haroenv avatar sbellone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

algolia-csv-js's Issues

It's not possible to upload an array column with a single value

I have an array column and sometimes it has a single value.

  1. If the value of that column is [0] the script treats it as a string.
  2. If I specify --parse-arrays=column that it creates an array column with [0] as a string value, .e. ["[0]"].
  3. If the column has the value 0 and --parse-arrays=column it throws an error because it does not find a comma
  4. If the column has the value 0, and --parse-arrays=column it creates an array like this ["0",""]

Hence it seems not possible to upload arrays with a single value.

How does this handle duplicate data?

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?

Support uploading nested data via CSV

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"}

Error Parsing with # symbols

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.