Error: line 25 did not have 57 elements
- Dominant language
- R
- Stars
- 10
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
This error is caused by the `sep` parameter.
I still need to figure how to fix it.
```
> lapply(valid_months$new_lcl, FUN = DBI::dbWriteTable, conn = obj$con,
+ name = "calls", sep = "|")
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
line 25 did not have 57 elements
```
```
> lapply(valid_months$new_lcl, FUN = DBI::dbWriteTable, conn = obj$con,
+ name = "calls", sep = "?")
Error in .local(conn, name, value, ...) :
RS_sqlite_import: /Users/Priscilla/Desktop/nyc311/load/nyc311_2011_1.csv line 8415 expected 1 columns of data but found 57
> lapply(valid_months$new_lcl, FUN = DBI::dbWriteTable, conn = obj$con,
+ name = "calls", sep = "~")
[[1]]
[1] TRUE
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the lapply call using DBI::dbWriteTable with the nyc311 CSV data, comparing sep="|", sep="?", and sep="~". Inspect the reported malformed rows, including line 25 and line 8415, and confirm that the chosen separator imports the data without column-count errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100