Skip to content

Commit

Permalink
Inline
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Apr 22, 2024
1 parent c551a08 commit fa9c56a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clients/snowflake/staging.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ func castColValStaging(colVal any, colKind columns.Column, additionalDateFmts []
}

func (s *Store) PrepareTemporaryTable(tableData *optimization.TableData, tableConfig *types.DwhTableConfig, tempTableID types.TableIdentifier, additionalSettings types.AdditionalSettings, createTempTable bool) error {
tempTableName := tempTableID.FullyQualifiedName()

if createTempTable {
tempAlterTableArgs := ddl.AlterTableArgs{
Dwh: s,
Expand Down Expand Up @@ -87,7 +85,8 @@ func (s *Store) PrepareTemporaryTable(tableData *optimization.TableData, tableCo

// COPY the CSV file (in Snowflake) into a table
copyCommand := fmt.Sprintf("COPY INTO %s (%s) FROM (SELECT %s FROM @%s)",
tempTableName, strings.Join(tableData.ReadOnlyInMemoryCols().GetColumnsToUpdate(s.ShouldUppercaseEscapedNames(), &sql.NameArgs{
tempTableID.FullyQualifiedName(),
strings.Join(tableData.ReadOnlyInMemoryCols().GetColumnsToUpdate(s.ShouldUppercaseEscapedNames(), &sql.NameArgs{
Escape: true,
DestKind: s.Label(),
}), ","),
Expand Down

0 comments on commit fa9c56a

Please sign in to comment.