diff --git a/models/stg_marketo__lead.sql b/models/stg_marketo__lead.sql index 40e4b93..2e546bb 100644 --- a/models/stg_marketo__lead.sql +++ b/models/stg_marketo__lead.sql @@ -20,7 +20,7 @@ with leads as ( cast(merged_lead_id as INT64) as lead_id, cast(lead_id as string) as merged_into_lead_id {% else %} - cast(merged_lead_id as integer) as lead_id, + try_cast(merged_lead_id as integer) as lead_id, cast(lead_id as varchar) as merged_into_lead_id {% endif %} from merged_leads @@ -39,4 +39,4 @@ with leads as ( ) select * -from joined \ No newline at end of file +from joined