algolia / algolia/algolia-csv-js

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

Open
#5 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the four cases in the CLI with --parse-arrays=column, focusing on how array-column values are parsed. Done means a single value such as [0], 0, or 0, is handled as an array according to the intended behavior without producing the reported string value or error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.