Skip to content

Commit

Permalink
One more
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie committed Apr 21, 2024
1 parent dc8e53a commit 6ce70a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clients/snowflake/staging.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (s *Store) PrepareTemporaryTable(tableData *optimization.TableData, tableCo
}

// Write data into CSV
fp, err := s.writeTemporaryTableFile(tableData, tempTableName)
fp, err := s.writeTemporaryTableFile(tableData, tempTableID)
if err != nil {
return fmt.Errorf("failed to load temporary table: %w", err)
}
Expand Down Expand Up @@ -104,8 +104,8 @@ func (s *Store) PrepareTemporaryTable(tableData *optimization.TableData, tableCo
return nil
}

func (s *Store) writeTemporaryTableFile(tableData *optimization.TableData, newTableName string) (string, error) {
fp := filepath.Join(os.TempDir(), fmt.Sprintf("%s.csv", newTableName))
func (s *Store) writeTemporaryTableFile(tableData *optimization.TableData, newTableID types.TableIdentifier) (string, error) {
fp := filepath.Join(os.TempDir(), fmt.Sprintf("%s.csv", newTableID.FullyQualifiedName()))
file, err := os.Create(fp)
if err != nil {
return "", err
Expand Down

0 comments on commit 6ce70a0

Please sign in to comment.