iyashk-DB
Databricks Employee
Databricks Employee

Yes similar to what @Coffee77 has told, you can alternatively create an SQL function and use it directly with the custom logic using the regexp:

CREATE OR REPLACE FUNCTION PROPER_WITH_ABBREVIATIONS(input STRING)
RETURNS STRING
RETURN regexp_replace(
INITCAP(input),
'(?i)(?<!\\d)([a-z])\\.(?!\\d)',
upper('$1') || '.'
);