Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should RSQLite:::rsqlite_import_file break if problem row happens beyond extent of desired import? #248

Closed
ajdamico opened this issue Jan 15, 2018 · 3 comments
Labels

Comments

@ajdamico
Copy link

hi, question..here's a malformed csv file at row 3. if the user only wants rows 1 and 2, should the import throw an error?

library(DBI)
tf <- tempfile()
writeLines( "1,2\n3,4\n5" , tf )
db <- dbConnect( RSQLite::SQLite() )
dbWriteTable( db , 'x' , tf , nrows = 2 , header = FALSE )

thanks!

@krlmlr
Copy link
Member

krlmlr commented Apr 30, 2018

It should, but currently does not, see #249.

@krlmlr
Copy link
Member

krlmlr commented Jan 4, 2020

Throwing an error now:

library(DBI)
tf <- tempfile()
writeLines("1,2\n3,4\n5", tf)
db <- dbConnect(RSQLite::SQLite())
dbWriteTable(db, "x", tf, nrows = 2, header = FALSE)
#> Error in connection_import_file(conn@ptr, name, value, sep, eol, skip): RS_sqlite_import: /tmp/RtmpV0PNWz/file140217dfcc56 line 3 expected 2 columns of data but found 1

Created on 2020-01-04 by the reprex package (v0.3.0)

@krlmlr krlmlr closed this as completed Jan 4, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2021

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 4, 2021
@krlmlr krlmlr added feature and removed enhancement labels Nov 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants