From 019e0955e687826346eb8a04cd2235a38098c535 Mon Sep 17 00:00:00 2001 From: Nathan Villaescusa Date: Mon, 22 Apr 2024 11:59:20 -0700 Subject: [PATCH] Error on config --- lib/config/bigquery.go | 8 ++++++++ lib/config/config.go | 4 ++++ lib/config/mssql.go | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/lib/config/bigquery.go b/lib/config/bigquery.go index 6e8250daa..14a7642c8 100644 --- a/lib/config/bigquery.go +++ b/lib/config/bigquery.go @@ -29,3 +29,11 @@ func (b *BigQuery) DSN() string { return dsn } + +func (c Config) ValidateBigQuery() error { + if c.SharedDestinationConfig.UppercaseEscapedNames { + return fmt.Errorf("uppercaseEscapedNames is not supported for BigQuery") + } + + return nil +} diff --git a/lib/config/config.go b/lib/config/config.go index 59c1d916f..89df04ca2 100644 --- a/lib/config/config.go +++ b/lib/config/config.go @@ -265,6 +265,10 @@ func (c Config) Validate() error { } switch c.Output { + case constants.BigQuery: + if err := c.ValidateBigQuery(); err != nil { + return err + } case constants.MSSQL: if err := c.ValidateMSSQL(); err != nil { return err diff --git a/lib/config/mssql.go b/lib/config/mssql.go index 15eb4d3f4..12bf9e85c 100644 --- a/lib/config/mssql.go +++ b/lib/config/mssql.go @@ -47,5 +47,9 @@ func (c Config) ValidateMSSQL() error { return fmt.Errorf("invalid mssql port: %d", c.MSSQL.Port) } + if c.SharedDestinationConfig.UppercaseEscapedNames { + return fmt.Errorf("uppercaseEscapedNames is not supported for MS SQL") + } + return nil }