Skip to content

Commit

Permalink
fix(sink): license SQL Server sink (#17910)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 authored Aug 5, 2024
1 parent bf1c1db commit faf4ecd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/connector/src/sink/sqlserver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ impl Sink for SqlServerSink {
const SINK_NAME: &'static str = SQLSERVER_SINK;

async fn validate(&self) -> Result<()> {
risingwave_common::license::Feature::SqlServerSink
.check_available()
.map_err(|e| anyhow::anyhow!(e))?;

if !self.is_append_only && self.pk_indices.is_empty() {
return Err(SinkError::Config(anyhow!(
"Primary key not defined for upsert SQL Server sink (please define in `primary_key` field)")));
Expand Down
1 change: 1 addition & 0 deletions src/license/src/feature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ macro_rules! for_all_features {
{ TimeTravel, Paid, "Query historical data within the retention period."},
{ GlueSchemaRegistry, Paid, "Use Schema Registry from AWS Glue rather than Confluent." },
{ SecretManagement, Paid, "Secret management." },
{ SqlServerSink, Paid, "Sink data from RisingWave to SQL Server." },
}
};
}
Expand Down

0 comments on commit faf4ecd

Please sign in to comment.