{"action":"created","issue":{"url":"https://api.github.com/repos/r-dbi/odbc/issues/234","repository_url":"https://api.github.com/repos/r-dbi/odbc","labels_url":"https://api.github.com/repos/r-dbi/odbc/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/r-dbi/odbc/issues/234/comments","events_url":"https://api.github.com/repos/r-dbi/odbc/issues/234/events","html_url":"https://github.com/r-dbi/odbc/issues/234","id":368878260,"node_id":"MDU6SXNzdWUzNjg4NzgyNjA=","number":234,"title":"Cannot write tables in Google BigQuery","user":{"login":"blairj09","id":10444878,"node_id":"MDQ6VXNlcjEwNDQ0ODc4","avatar_url":"https://avatars1.githubusercontent.com/u/10444878?v=4","gravatar_id":"","url":"https://api.github.com/users/blairj09","html_url":"https://github.com/blairj09","followers_url":"https://api.github.com/users/blairj09/followers","following_url":"https://api.github.com/users/blairj09/following{/other_user}","gists_url":"https://api.github.com/users/blairj09/gists{/gist_id}","starred_url":"https://api.github.com/users/blairj09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairj09/subscriptions","organizations_url":"https://api.github.com/users/blairj09/orgs","repos_url":"https://api.github.com/users/blairj09/repos","events_url":"https://api.github.com/users/blairj09/events{/privacy}","received_events_url":"https://api.github.com/users/blairj09/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-10T22:19:14Z","updated_at":"2018-10-12T05:17:29Z","closed_at":null,"author_association":"NONE","body":"### Issue Description and Expected Result\r\n`dbWriteTable()` when connected to Google BigQuery returns the following error:\r\n```\r\nError in new_result(connection@ptr, statement): nanodbc/nanodbc.cpp:1344: 42000: [RStudio][BigQuery] (70) Invalid query: Syntax error: Expected \")\" or \",\" but got identifier \"PRECISION\" at [2:22]\r\n```\r\n\r\n### Database\r\nGoogle BigQuery\r\n\r\n### Reproducible Example\r\n```r\r\nlibrary(DBI)\r\ncon <- dbConnect(odbc::odbc(), \"Bigquery (DSN)\")\r\n\r\ndbIsValid(con)\r\n#> [1] TRUE\r\ndbListTables(con)\r\n#> [1] \"bank\"\r\n\r\nfaithful_trunc <- head(faithful)\r\n\r\ndbWriteTable(con, \"faithful\", faithful_trunc)\r\n#> Error in new_result(connection@ptr, statement): nanodbc/nanodbc.cpp:1344: 42000: [RStudio][BigQuery] (70) Invalid query: Syntax error: Expected \")\" or \",\" but got identifier \"PRECISION\" at [2:22]\r\n\r\ndbListTables(con)\r\n#> [1] \"bank\"\r\n\r\ndbExecute(con, \"CREATE TABLE IF NOT EXISTS faithful (eruptions NUMERIC, waiting NUMERIC)\")\r\n#> [1] 0\r\npurrr::walk(glue::glue_sql(\"INSERT INTO faithful (eruptions, waiting) VALUES ({faithful_trunc$eruptions}, {faithful_trunc$waiting})\"),\r\n            ~dbExecute(con, .))\r\n\r\ndbListTables(con)\r\n#> [1] \"bank\"     \"faithful\"\r\ndbReadTable(con, \"faithful\")\r\n#>   eruptions waiting\r\n#> 1     3.333      74\r\n#> 2     4.533      85\r\n#> 3     2.283      62\r\n#> 4     3.600      79\r\n#> 5     1.800      54\r\n#> 6     2.883      55\r\n```\r\n\r\n<details>\r\n<summary>Session Info</summary>\r\n\r\n```r\r\ndevtools::session_info()\r\n#> Warning in system(\"timedatectl\", intern = TRUE): running command\r\n#> 'timedatectl' had status 1\r\n#> Session info -------------------------------------------------------------\r\n#>  setting  value                       \r\n#>  version  R version 3.5.1 (2018-07-02)\r\n#>  system   x86_64, linux-gnu           \r\n#>  ui       unknown                     \r\n#>  language (EN)                        \r\n#>  collate  en_US.UTF-8                 \r\n#>  tz       America/New_York            \r\n#>  date     2018-10-10\r\n#> Packages -----------------------------------------------------------------\r\n#>  package   * version date       source        \r\n#>  backports   1.1.2   2017-12-13 RSPM (R 3.5.1)\r\n#>  base      * 3.5.1   2018-08-17 local         \r\n#>  bit         1.1-14  2018-05-29 RSPM (R 3.5.1)\r\n#>  bit64       0.9-7   2017-05-08 RSPM (R 3.5.1)\r\n#>  blob        1.1.1   2018-03-25 RSPM (R 3.5.1)\r\n#>  compiler    3.5.1   2018-08-17 local         \r\n#>  datasets  * 3.5.1   2018-08-17 local         \r\n#>  DBI       * 1.0.0   2018-05-02 RSPM (R 3.5.1)\r\n#>  devtools    1.13.6  2018-06-27 RSPM (R 3.5.1)\r\n#>  digest      0.6.16  2018-08-22 RSPM (R 3.5.1)\r\n#>  evaluate    0.11    2018-07-17 RSPM (R 3.5.1)\r\n#>  glue        1.3.0   2018-07-17 RSPM (R 3.5.1)\r\n#>  graphics  * 3.5.1   2018-08-17 local         \r\n#>  grDevices * 3.5.1   2018-08-17 local         \r\n#>  hms         0.4.2   2018-03-10 RSPM (R 3.5.1)\r\n#>  htmltools   0.3.6   2017-04-28 RSPM (R 3.5.1)\r\n#>  knitr       1.20    2018-02-20 RSPM (R 3.5.1)\r\n#>  magrittr    1.5     2014-11-22 RSPM (R 3.5.1)\r\n#>  memoise     1.1.0   2017-04-21 RSPM (R 3.5.1)\r\n#>  methods   * 3.5.1   2018-08-17 local         \r\n#>  odbc        1.1.6   2018-06-09 RSPM (R 3.5.1)\r\n#>  pkgconfig   2.0.2   2018-08-16 RSPM (R 3.5.1)\r\n#>  purrr       0.2.5   2018-05-29 RSPM (R 3.5.1)\r\n#>  Rcpp        0.12.18 2018-07-23 RSPM (R 3.5.1)\r\n#>  rlang       0.2.2   2018-08-16 RSPM (R 3.5.1)\r\n#>  rmarkdown   1.10    2018-06-11 RSPM (R 3.5.1)\r\n#>  rprojroot   1.3-2   2018-01-03 RSPM (R 3.5.1)\r\n#>  stats     * 3.5.1   2018-08-17 local         \r\n#>  stringi     1.2.4   2018-07-20 RSPM (R 3.5.1)\r\n#>  stringr     1.3.1   2018-05-10 RSPM (R 3.5.1)\r\n#>  tools       3.5.1   2018-08-17 local         \r\n#>  utils     * 3.5.1   2018-08-17 local         \r\n#>  withr       2.1.2   2018-03-15 RSPM (R 3.5.1)\r\n#>  yaml        2.2.0   2018-07-25 RSPM (R 3.5.1)\r\n\r\nodbc::odbcListDrivers()\r\n#>          name attribute\r\n#> 1      Athena    Driver\r\n#> 2    BigQuery    Driver\r\n#> 3   Cassandra    Driver\r\n#> 4        Hive    Driver\r\n#> 5      Impala    Driver\r\n#> 6     MongoDB    Driver\r\n#> 7       MySQL    Driver\r\n#> 8     Netezza    Driver\r\n#> 9  PostgreSQL    Driver\r\n#> 10   Redshift    Driver\r\n#> 11 Salesforce    Driver\r\n#> 12  SQLServer    Driver\r\n#> 13   Teradata    Driver\r\n#> 14     Oracle    Driver\r\n#>                                                                  value\r\n#> 1            /opt/rstudio-drivers/athena/bin/lib/libathenaodbc_sb64.so\r\n#> 2  /opt/rstudio-drivers/bigquery/bin/lib/libgooglebigqueryodbc_sb64.so\r\n#> 3      /opt/rstudio-drivers/cassandra/bin/lib/libcassandraodbc_sb64.so\r\n#> 4                /opt/rstudio-drivers/hive/bin/lib/libhiveodbc_sb64.so\r\n#> 5            /opt/rstudio-drivers/impala/bin/lib/libimpalaodbc_sb64.so\r\n#> 6          /opt/rstudio-drivers/mongodb/bin/lib/libmongodbodbc_sb64.so\r\n#> 7              /opt/rstudio-drivers/mysql/bin/lib/libmysqlodbc_sb64.so\r\n#> 8          /opt/rstudio-drivers/netezza/bin/lib/libnetezzaodbc_sb64.so\r\n#> 9    /opt/rstudio-drivers/postgresql/bin/lib/libpostgresqlodbc_sb64.so\r\n#> 10 /opt/rstudio-drivers/redshift/bin/lib/libamazonredshiftodbc_sb64.so\r\n#> 11   /opt/rstudio-drivers/salesforce/bin/lib/libsalesforceodbc_sb64.so\r\n#> 12     /opt/rstudio-drivers/sqlserver/bin/lib/libsqlserverodbc_sb64.so\r\n#> 13             /opt/rstudio-drivers/teradata/bin/lib/tdataodbc_sb64.so\r\n#> 14           /opt/rstudio-drivers/oracle/bin/lib/liboracleodbc_sb64.so\r\n```\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/r-dbi/odbc/issues/comments/429207002","html_url":"https://github.com/r-dbi/odbc/issues/234#issuecomment-429207002","issue_url":"https://api.github.com/repos/r-dbi/odbc/issues/234","id":429207002,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTIwNzAwMg==","user":{"login":"blairj09","id":10444878,"node_id":"MDQ6VXNlcjEwNDQ0ODc4","avatar_url":"https://avatars1.githubusercontent.com/u/10444878?v=4","gravatar_id":"","url":"https://api.github.com/users/blairj09","html_url":"https://github.com/blairj09","followers_url":"https://api.github.com/users/blairj09/followers","following_url":"https://api.github.com/users/blairj09/following{/other_user}","gists_url":"https://api.github.com/users/blairj09/gists{/gist_id}","starred_url":"https://api.github.com/users/blairj09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairj09/subscriptions","organizations_url":"https://api.github.com/users/blairj09/orgs","repos_url":"https://api.github.com/users/blairj09/repos","events_url":"https://api.github.com/users/blairj09/events{/privacy}","received_events_url":"https://api.github.com/users/blairj09/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T05:17:29Z","updated_at":"2018-10-12T05:17:29Z","author_association":"NONE","body":"Excellent! I'll start working on those. Thanks @jimhester "}}
{"actor":{"display_login":"blairj09"}}