Skip to content

Commit

Permalink
chore(snowflake): remove conditional token
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Mar 20, 2024
1 parent 3955d88 commit a7d2dc0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions flow/connectors/snowflake/qrep.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,8 @@ func (c *SnowflakeConnector) createExternalStage(ctx context.Context, stageName
return "", err
}
if s3Int == "" {
awsTokenParam := ""
if creds.AWS.SessionToken != "" {
awsTokenParam = fmt.Sprintf(" AWS_TOKEN='%s'", creds.AWS.SessionToken)
}
credsStr := fmt.Sprintf("CREDENTIALS=(AWS_KEY_ID='%s' AWS_SECRET_KEY='%s'%s)",
creds.AWS.AccessKeyID, creds.AWS.SecretAccessKey, awsTokenParam)

credsStr := fmt.Sprintf("CREDENTIALS=(AWS_KEY_ID='%s' AWS_SECRET_KEY='%s' AWS_TOKEN='%s')",
creds.AWS.AccessKeyID, creds.AWS.SecretAccessKey, creds.AWS.SessionToken)
stageStatement := `
CREATE OR REPLACE STAGE %s
URL = '%s'
Expand Down

0 comments on commit a7d2dc0

Please sign in to comment.