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

Prevent Noctua from printing Data Scanned -information #178

Closed
vhpietil opened this issue Jan 13, 2022 · 7 comments
Closed

Prevent Noctua from printing Data Scanned -information #178

vhpietil opened this issue Jan 13, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@vhpietil
Copy link

Is there a way to prevent Noctua from printing Data scanned information?

@DyfanJones
Copy link
Owner

Currently no, it was an previous feature request so it was added, however I should of added a method to make it quiet. Happy to add it in if you like :)

@vhpietil
Copy link
Author

I would be very happy if there was an option to switch it off instead of using suppressMessages in every query :)

@DyfanJones
Copy link
Owner

So something like this:

remotes::install_github("dyfanjones/noctua", ref="verbose")
library(DBI)
library(noctua)

con <- dbConnect(athena())

dbGetQuery(con, "select * from iris limit 5")
#>    sepal_length sepal_width petal_length petal_width species
#> 1:          5.1         3.5          1.4         0.2  setosa
#> 2:          4.9         3.0          1.4         0.2  setosa
#> 3:          4.7         3.2          1.3         0.2  setosa
#> 4:          4.6         3.1          1.5         0.2  setosa
#> 5:          5.0         3.6          1.4         0.2  setosa

noctua_options(verbose = T)

dbGetQuery(con, "select * from iris limit 5")
#> Info: (Data scanned: 3.63 KB)
#>    sepal_length sepal_width petal_length petal_width species
#> 1:          5.1         3.5          1.4         0.2  setosa
#> 2:          4.9         3.0          1.4         0.2  setosa
#> 3:          4.7         3.2          1.3         0.2  setosa
#> 4:          4.6         3.1          1.5         0.2  setosa
#> 5:          5.0         3.6          1.4         0.2  setosa

Created on 2022-01-13 by the reprex package (v2.0.1)

Currently not sure to have verbose set to FALSE for default or have the user switch to FALSE if they don't like the extra information.

@DyfanJones DyfanJones self-assigned this Jan 13, 2022
@DyfanJones DyfanJones added the enhancement New feature or request label Jan 13, 2022
@vhpietil
Copy link
Author

Something like that would be nice

@DyfanJones
Copy link
Owner

Should all information message be optionally turned off? 🤔 Would make it consistent across the package. If that is the case then can leave the default package verbose as TRUE and let the user turn it off.

@vhpietil
Copy link
Author

vhpietil commented Jan 13, 2022 via email

@DyfanJones
Copy link
Owner

Closing this ticket as version 2.5.0 has been pushed to the cran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants