From 34e8099dc6abcd6ac9824a49151e3ed3bd4a6fdd Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Wed, 2 Oct 2024 09:15:54 -0700 Subject: [PATCH] Clean up. --- lib/config/constants/constants.go | 1 + lib/config/destination_types.go | 2 +- lib/destination/utils/load.go | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/config/constants/constants.go b/lib/config/constants/constants.go index 3d0994854..4512f8583 100644 --- a/lib/config/constants/constants.go +++ b/lib/config/constants/constants.go @@ -78,6 +78,7 @@ const ( // TODO: Add Databricks to this list once it's ready var ValidDestinations = []DestinationKind{ BigQuery, + Databricks, MSSQL, Redshift, S3, diff --git a/lib/config/destination_types.go b/lib/config/destination_types.go index 8ce990a36..0ff0b3dbe 100644 --- a/lib/config/destination_types.go +++ b/lib/config/destination_types.go @@ -13,7 +13,7 @@ type BigQuery struct { type Databricks struct { Host string `yaml:"host"` - HttpPath string `json:"httpPath"` + HttpPath string `yaml:"httpPath"` Port int `yaml:"port"` Catalog string `yaml:"catalog"` PersonalAccessToken string `yaml:"personalAccessToken"` diff --git a/lib/destination/utils/load.go b/lib/destination/utils/load.go index 21bc1d89f..ff830a7a1 100644 --- a/lib/destination/utils/load.go +++ b/lib/destination/utils/load.go @@ -3,6 +3,8 @@ package utils import ( "fmt" + "github.com/artie-labs/transfer/clients/databricks" + "github.com/artie-labs/transfer/clients/bigquery" "github.com/artie-labs/transfer/clients/mssql" "github.com/artie-labs/transfer/clients/redshift" @@ -45,6 +47,8 @@ func LoadDataWarehouse(cfg config.Config, store *db.Store) (destination.DataWare return s, nil case constants.BigQuery: return bigquery.LoadBigQuery(cfg, store) + case constants.Databricks: + return databricks.LoadStore(cfg) case constants.MSSQL: s, err := mssql.LoadStore(cfg) if err != nil {