liamnz commented on issue #2366:
URL: https://github.com/apache/arrow-adbc/issues/2366#issuecomment-2546647796

   The count works outside of `write_adbc()` though 🫤 
   
   ```r
   # install.packages('adbcdrivermanager')
   # install.packages("adbcsnowflake", repos = 
"https://community.r-multiverse.org";)
   
   library(adbcdrivermanager)
   library(adbcsnowflake)
   
   db <- adbc_database_init(
     adbcsnowflake(),
     username = Sys.getenv('SNOWFLAKE_USER'),
     adbc.snowflake.sql.account = Sys.getenv('SNOWFLAKE_ACCOUNT'),
     adbc.snowflake.sql.uri.protocol = 'https',
     adbc.snowflake.sql.uri.host = paste0(Sys.getenv('SNOWFLAKE_ACCOUNT'), 
'.snowflakecomputing.com'),
     adbc.snowflake.sql.uri.port = '443',
     adbc.snowflake.sql.auth_type = 'auth_ext_browser',
     adbc.snowflake.sql.role = Sys.getenv("SNOWFLAKE_ROLE"),
     adbc.snowflake.sql.warehouse = Sys.getenv("SNOWFLAKE_WAREHOUSE"),
     adbc.snowflake.sql.db = Sys.getenv("SNOWFLAKE_DATABASE")
   )
   
   con <- adbc_connection_init(db)
   
   execute_adbc(con, 'create or replace schema reprex')
   execute_adbc(con, 'use schema reprex')
   
   x <- data.frame(A = 1, B = 2, C = 3)
   write_adbc(x, con, 'X')
   #> Error in adbc_statement_execute_query(stmt): NOT_FOUND: 002003 (42S02): 
SQL compilation error:
   #> Object 'X' does not exist or not authorized.
   
   read_adbc(con, "SELECT COUNT(*) FROM IDENTIFIER('\"X\"')") |> as.data.frame()
   #>   COUNT(*)
   #> 1        0
   ```
   Created on 2024-12-17 with [reprex v2.1.1](https://reprex.tidyverse.org/)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to