From c547fcadb2dc8b544b159389a5fc55170c08071e Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Tue, 8 Oct 2024 08:58:04 -0700 Subject: [PATCH] Update. --- clients/redshift/staging.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clients/redshift/staging.go b/clients/redshift/staging.go index b2f708043..bc2602c5d 100644 --- a/clients/redshift/staging.go +++ b/clients/redshift/staging.go @@ -10,7 +10,6 @@ import ( "strings" "github.com/artie-labs/transfer/lib/config/constants" - "github.com/artie-labs/transfer/lib/destination" "github.com/artie-labs/transfer/lib/destination/ddl" "github.com/artie-labs/transfer/lib/destination/types" "github.com/artie-labs/transfer/lib/optimization" @@ -35,8 +34,8 @@ func (s *Store) PrepareTemporaryTable(tableData *optimization.TableData, tableCo }) } - if len(queries) > 0 { - if err = destination.ExecStatements(s, queries); err != nil { + for _, query := range queries { + if _, err = s.Exec(query); err != nil { return fmt.Errorf("failed to increase string precision for table %q: %w", parentTableID.FullyQualifiedName(), err) } }