diff --git a/crates/components/wick-sql/src/mssql_tiberius/component.rs b/crates/components/wick-sql/src/mssql_tiberius/component.rs index d1c24d5c..cf17fced 100644 --- a/crates/components/wick-sql/src/mssql_tiberius/component.rs +++ b/crates/components/wick-sql/src/mssql_tiberius/component.rs @@ -402,8 +402,8 @@ async fn init_context(config: SqlComponentConfig, addr: Url) -> Result Value { let mut map: Map = Map::new(); for col in row.columns() { - let v = row.get::<'_, FromSqlWrapper, _>(col.name()).unwrap(); - map.insert(col.name().to_owned(), v.0); + let v = row.get::<'_, FromSqlWrapper, _>(col.name()); + map.insert(col.name().to_owned(), v.map_or(Value::Null, |v| v.0)); } Value::Object(map) }