Skip to content

Commit

Permalink
update validate to ensure append-only
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhseh committed Mar 18, 2024
1 parent 3fc56b9 commit e4bebb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/connector/src/sink/snowflake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ impl Sink for SnowflakeSink {
}

async fn validate(&self) -> Result<()> {
if !self.is_append_only {
return Err(SinkError::Config(
anyhow!("SnowflakeSink only supports append-only mode at present, please change the configuration accordingly to enable sinking.")
));
}
Ok(())
}
}
Expand Down Expand Up @@ -259,7 +264,7 @@ impl SnowflakeSinkWriter {
self.epoch = epoch;
}

/// Construct the file suffix for current sink
/// Construct the *unique* file suffix for the sink
fn file_suffix(&self) -> String {
format!("{}_{}", self.epoch, self.sink_file_suffix)
}
Expand Down

0 comments on commit e4bebb1

Please sign in to comment.