Hi Expert,
here is sql server scalar function how to convert in databricks function
SQL
CREATE function [dbo].[gettrans](@PickupCompany nvarchar(2),
@SupplyCountry int, @TxnSource nvarchar(10),
@locId nvarchar(50), @ExternalSiteId nvarchar(50))
RETURNS INT
AS
BEGIN
DECLARE @worldSiteid INT
SET @worldSiteid = 0
If (@TxnSource = 'CDX')
BEGIN