From b806fc5b95c46b82623f5592b0073b49d5af1c68 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Fri, 27 Sep 2024 17:05:58 -0700 Subject: [PATCH] Clean up. --- clients/databricks/dialect/dialect.go | 6 +++--- lib/config/destination_types.go | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/clients/databricks/dialect/dialect.go b/clients/databricks/dialect/dialect.go index 2bd001564..0b3e16a60 100644 --- a/clients/databricks/dialect/dialect.go +++ b/clients/databricks/dialect/dialect.go @@ -19,7 +19,7 @@ func (d DatabricksDialect) QuoteIdentifier(identifier string) string { } func (d DatabricksDialect) EscapeStruct(value string) string { - return strings.ReplaceAll(value, "`", "``") + panic("not implemented") // We don't currently support backfills for Databricks. } func (d DatabricksDialect) DataTypeForKind(kd typing.KindDetails, _ bool) string { @@ -56,7 +56,7 @@ func (d DatabricksDialect) DataTypeForKind(kd typing.KindDetails, _ bool) string } func (d DatabricksDialect) KindForDataType(_type string, _ string) (typing.KindDetails, error) { - // Implement the reverse mapping from Databricks data types to KindDetails + // TODO: Finish switch strings.ToUpper(_type) { case "STRING": return typing.String, nil @@ -164,5 +164,5 @@ WHEN NOT MATCHED AND IFNULL(%s, false) = false THEN INSERT (%s) VALUES (%s);`, } func (d DatabricksDialect) GetDefaultValueStrategy() sql.DefaultValueStrategy { - return sql.Backfill + return sql.Native } diff --git a/lib/config/destination_types.go b/lib/config/destination_types.go index b7c8a72c7..680f7ffa2 100644 --- a/lib/config/destination_types.go +++ b/lib/config/destination_types.go @@ -1,8 +1,6 @@ package config -import ( - "github.com/artie-labs/transfer/lib/config/constants" -) +import "github.com/artie-labs/transfer/lib/config/constants" type BigQuery struct { // PathToCredentials is _optional_ if you have GOOGLE_APPLICATION_CREDENTIALS set as an env var