From e323b8ed2f93dce67bd5948a89d4ed9a7b25cc4c Mon Sep 17 00:00:00 2001 From: "pavel.voropaev" Date: Thu, 1 Dec 2022 16:28:12 +0000 Subject: [PATCH] Databricks: Quote catalog and schema names in SQL statements (close #1143) --- .../snowplow/loader/databricks/Databricks.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/databricks-loader/src/main/scala/com/snowplowanalytics/snowplow/loader/databricks/Databricks.scala b/modules/databricks-loader/src/main/scala/com/snowplowanalytics/snowplow/loader/databricks/Databricks.scala index ab1751ce2..26fc867e7 100644 --- a/modules/databricks-loader/src/main/scala/com/snowplowanalytics/snowplow/loader/databricks/Databricks.scala +++ b/modules/databricks-loader/src/main/scala/com/snowplowanalytics/snowplow/loader/databricks/Databricks.scala @@ -193,8 +193,8 @@ object Databricks { } private def qualify(tableName: String): String = tgt.catalog match { - case Some(catalog) => s"${catalog}.${tgt.schema}.$tableName" - case None => s"${tgt.schema}.$tableName" + case Some(catalog) => s"`${catalog}`.`${tgt.schema}`.$tableName" + case None => s"`${tgt.schema}`.$tableName" } } Right(result)