Skip to content

Commit

Permalink
add log sinker
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhseh committed Mar 11, 2024
1 parent 7a9fdf9 commit db090a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/connector/src/sink/snowflake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use super::encoder::JsonEncoder;
use super::snowflake_connector::{SnowflakeHttpClient, SnowflakeS3Client};
use super::writer::LogSinkerOf;
use super::{SinkError, SinkParam};
use crate::sink::writer::SinkWriterExt;
use crate::sink::{DummySinkCommitCoordinator, Result, Sink, SinkWriter, SinkWriterParam};

pub const SNOWFLAKE_SINK: &str = "snowflake";
Expand Down Expand Up @@ -102,7 +103,12 @@ impl Sink for SnowflakeSink {
const SINK_NAME: &'static str = SNOWFLAKE_SINK;

async fn new_log_sinker(&self, writer_param: SinkWriterParam) -> Result<Self::LogSinker> {
todo!()
Ok(SnowflakeSinkWriter::new(
self.config.clone(),
self.schema.clone(),
self.pk_indices.clone(),
self.is_append_only,
).into_log_sink(writer_param.sink_metrics))
}

async fn validate(&self) -> Result<()> {
Expand Down

0 comments on commit db090a9

Please sign in to comment.