diff --git a/flow/connectors/snowflake/qrep.go b/flow/connectors/snowflake/qrep.go index 96e337a3f1..7ba84741a9 100644 --- a/flow/connectors/snowflake/qrep.go +++ b/flow/connectors/snowflake/qrep.go @@ -135,7 +135,10 @@ func (c *SnowflakeConnector) createExternalStage(stageName string, config *proto cleanURL := fmt.Sprintf("s3://%s/%s/%s", s3o.Bucket, s3o.Prefix, config.FlowJobName) - s3Int := config.DestinationPeer.GetSnowflakeConfig().S3Integration + var s3Int string + if config.DestinationPeer != nil { + s3Int = config.DestinationPeer.GetSnowflakeConfig().S3Integration + } if s3Int == "" { credsStr := fmt.Sprintf("CREDENTIALS=(AWS_KEY_ID='%s' AWS_SECRET_KEY='%s')", awsCreds.AccessKeyID, awsCreds.SecretAccessKey) diff --git a/flow/connectors/snowflake/snowflake.go b/flow/connectors/snowflake/snowflake.go index 746768bf51..b1877320e1 100644 --- a/flow/connectors/snowflake/snowflake.go +++ b/flow/connectors/snowflake/snowflake.go @@ -459,7 +459,7 @@ func (c *SnowflakeConnector) syncRecordsViaAvro( } qrepConfig := &protos.QRepConfig{ - StagingPath: "", + StagingPath: req.StagingPath, FlowJobName: req.FlowJobName, DestinationTableIdentifier: strings.ToLower(fmt.Sprintf("%s.%s", c.rawSchema, rawTableIdentifier)),