Can't create agent using a `tbl_dbi` object when using MS SQL Server
Open
@rich-iannone is already working on this.
Since Feb 17, 2023.
Type: ☹︎ Bug
- Dominant language
- R
- Stars
- 1k
- Forks
- 59
- Avg merge
- 25m
- Merged PRs (30d)
- 4
Description
Prework
- Read and agree to the code of conduct and contributing guidelines.
- If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
- Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
- Runnable: post enough R code and data so any onlooker can create the error on their own computer.
- Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
- Readable: format your code according to the tidyverse style guide.
Description
When trying to create an agent with create_agent I get the error below.
We use: Microsoft SQL Server 2017 (RTM-CU31) (KB5016884) - 14.0.3456.2 (X64) Sep 2 2022 11:01:50 Copyright (C) 2017 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
Perhaps related to #352
Reproducible example
- Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
- Runnable: post enough R code and data so any onlooker can create the error on their own computer.
- Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
- Readable: format your code according to the tidyverse style guide.
con <- DBI::dbConnect(
odbc::odbc(),
driver = "ODBC Driver 17 for SQL Server",
server = Sys.getenv("SERVER"),
database = Sys.getenv("DB"),
uid = Sys.getenv("UID"),
pwd = Sys.getenv("PWD")
)
meta <- dplyr::tbl(con, dbplyr::in_schema("import", "jobs"))
smith <- pointblank::create_agent(tbl = meta)
#> Error in eval(expr, envir, enclos): Expecting a single string value: [type=character; extent=2].
Created on 2023-02-17 with reprex v2.0.2
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.2.2 Patched (2022-11-10 r83330)
#> os Ubuntu 20.04.5 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language en_US:en
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/Copenhagen
#> date 2023-02-17
#> pandoc 2.19.2 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.2.0)
#> bit 4.0.5 2022-11-15 [1] CRAN (R 4.2.2)
#> bit64 4.0.5 2020-08-30 [1] CRAN (R 4.2.0)
#> blastula 0.3.3 2023-01-07 [1] CRAN (R 4.2.2)
#> blob 1.2.3 2022-04-10 [1] CRAN (R 4.2.0)
#> cli 3.6.0 2023-01-09 [1] CRAN (R 4.2.2)
#> DBI 1.1.3 2022-06-18 [1] CRAN (R 4.2.0)
#> dbplyr 2.3.0 2023-01-16 [1] CRAN (R 4.2.2)
#> digest 0.6.30 2022-10-18 [3] CRAN (R 4.2.1)
#> dplyr 1.1.0 2023-01-29 [1] CRAN (R 4.2.2)
#> ellipsis 0.3.2 2021-04-29 [3] CRAN (R 4.0.5)
#> evaluate 0.20 2023-01-17 [3] CRAN (R 4.2.2)
#> fansi 1.0.4 2023-01-22 [3] CRAN (R 4.2.2)
#> fastmap 1.1.0 2021-01-25 [3] CRAN (R 4.0.3)
#> fs 1.6.0 2023-01-23 [1] CRAN (R 4.2.2)
#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.1)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0)
#> hms 1.1.2 2022-08-19 [1] CRAN (R 4.2.1)
#> htmltools 0.5.4 2022-12-07 [1] CRAN (R 4.2.2)
#> knitr 1.42 2023-01-25 [3] CRAN (R 4.2.2)
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.1)
#> magrittr 2.0.3 2022-03-30 [3] CRAN (R 4.1.3)
#> odbc 1.3.4 2023-01-17 [1] CRAN (R 4.2.2)
#> pillar 1.8.1 2022-08-19 [3] CRAN (R 4.2.1)
#> pkgconfig 2.0.3 2019-09-22 [3] CRAN (R 4.0.0)
#> pointblank 0.11.3 2023-02-09 [1] CRAN (R 4.2.2)
#> purrr 1.0.1 2023-01-10 [3] CRAN (R 4.2.2)
#> R6 2.5.1 2021-08-19 [3] CRAN (R 4.1.1)
#> Rcpp 1.0.10 2023-01-22 [3] CRAN (R 4.2.2)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.2.1)
#> rlang 1.0.6 2022-09-24 [3] CRAN (R 4.2.1)
#> rmarkdown 2.20 2023-01-19 [3] CRAN (R 4.2.2)
#> rstudioapi 0.14 2022-08-22 [3] CRAN (R 4.2.1)
#> sessioninfo 1.2.2 2021-12-06 [3] CRAN (R 4.1.2)
#> tibble 3.1.8 2022-07-22 [3] CRAN (R 4.2.2)
#> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.1)
#> utf8 1.2.3 2023-01-31 [3] CRAN (R 4.2.2)
#> vctrs 0.5.2 2023-01-23 [1] CRAN (R 4.2.2)
#> withr 2.5.0 2022-03-03 [3] CRAN (R 4.1.3)
#> xfun 0.36 2022-12-21 [1] CRAN (R 4.2.2)
#> yaml 2.3.7 2023-01-23 [3] CRAN (R 4.2.2)
#>
#> [1] /home/au206907/R/x86_64-pc-linux-gnu-library/4.2
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/lib/R/site-library
#> [4] /usr/lib/R/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
Expected result
Creation of the agent with no error.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.