Skip to content

Commit

Permalink
regex fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanBaker committed Jun 2, 2020
1 parent 2d29369 commit a85f81e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion models/stg_marketo__lead_describe.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ with base as (
soapread_only as is_soap_readonly
from base

), regex as (

select
*,
case
when rest_name like '%\\_\\_c%' then lower(rest_name)
else ltrim(lower(regexp_replace(rest_name, "[A-Z]",'_\\0')),'_')
end as rest_name_xf
from fields

)

select *
from fields
from regex

0 comments on commit a85f81e

Please sign in to comment.