From 36cf183b341d9c1482cfde492c64f40884b8dc4a Mon Sep 17 00:00:00 2001 From: Edgar Ruiz Date: Tue, 1 Oct 2024 14:45:40 -0500 Subject: [PATCH 1/2] Escapes catalog and schema names for connections pane --- R/ide-connections-pane.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/ide-connections-pane.R b/R/ide-connections-pane.R index 159b137..d424380 100644 --- a/R/ide-connections-pane.R +++ b/R/ide-connections-pane.R @@ -71,9 +71,9 @@ catalog_python <- function( out <- rs_get_databases(con, limit, catalog) } else { if (is.null(catalog)) { - sql_schema <- "show tables in {schema}" + sql_schema <- "show tables in `{schema}`" } else { - sql_schema <- "show tables in {catalog}.{schema}" + sql_schema <- "show tables in `{catalog}`.`{schema}`" } tables <- dbGetQuery(con, glue(sql_schema)) out <- df_tables @@ -99,7 +99,7 @@ catalog_python <- function( rs_get_databases <- function(con, limit = NA, catalog = NULL) { out <- data.frame() if (!is.null(catalog)) { - databases <- dbGetQuery(con, glue("show databases in {catalog}")) + databases <- dbGetQuery(con, glue("show databases in `{catalog}`")) } else { databases <- dbGetQuery(con, glue("show databases")) } From 96b39362601fe4f1263b05ec600a57a86ec00077 Mon Sep 17 00:00:00 2001 From: Edgar Ruiz Date: Tue, 1 Oct 2024 14:56:01 -0500 Subject: [PATCH 2/2] ver bump, news update --- DESCRIPTION | 2 +- NEWS.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 7fd70ed..6684820 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: pysparklyr Title: Provides a 'PySpark' Back-End for the 'sparklyr' Package -Version: 0.1.5.9001 +Version: 0.1.5.9002 Authors@R: c( person("Edgar", "Ruiz", , "edgar@posit.co", role = c("aut", "cre")), person(given = "Posit Software, PBC", role = c("cph", "fnd")) diff --git a/NEWS.md b/NEWS.md index 9d20db3..1fda5ad 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,8 @@ # pysparklyr (dev) +* Fixes issues with catalog and schema names with dashes in the Connections +Pane. + * Adds IDE check for positron (#121) * Avoids failure when an unexpected error from Databricks is returned (#123)