-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Description
When attempting to use a Snowflake DBI connection directly with QueryChat$new(), I encounter an ODBC character encoding error.
Environment:
- querychat: v0.2.0.9000 (dev version via
pak::pak("posit-dev/querychat/pkg-r")) - R version: 4.5
- Environment: Posit Team Snowflake Native App, Positron within Workbench
- Snowflake ODBC driver
Reproducible Example:
library(querychat)
library(DBI)
library(odbc)
# Initialize Snowflake connection
con <- DBI::dbConnect(
odbc::snowflake(),
account = Sys.getenv("SNOWFLAKE_ACCOUNT"),
warehouse = "DEFAULT_WH",
database = "SNOWFLAKE_PUBLIC_DATA_FREE",
schema = "PUBLIC_DATA_FREE"
)
# Verify connection works
DBI::dbListTables(con) # This works fine
# Attempt to create QueryChat with the connection
qc <- QueryChat$new(con, "HOME_MORTGAGE_DISCLOSURE_ATTRIBUTES")
Error:
Error: wstring_convert::to_bytes
Additional details:
Warning: Error in : wstring_convert::to_bytes
56: <Anonymous>
55: stop
54: connection_sql_tables
53: .local
52: odbcConnectionTables
50: DBI::dbExistsTable
48: initialize
47: DBISource$new
46: normalize_data_source
45: initialize
44: QueryChat$new
Questions:
- Is there a known issue with Snowflake ODBC drivers and QueryChat (R)?
- Are there any configuration options or workarounds to enable direct Snowflake connection support?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels