Skip to content

Commit

Permalink
docs on docs on docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanBaker committed May 29, 2020
1 parent 465e86e commit c886b6c
Show file tree
Hide file tree
Showing 13 changed files with 1,136 additions and 26 deletions.
554 changes: 552 additions & 2 deletions models/src_marketo.yml

Large diffs are not rendered by default.

480 changes: 479 additions & 1 deletion models/stg_marketo.yml

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions models/stg_marketo__activity_change_data_value.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ with base as (
), fields as (

select
activity_date as activity_timestamp,
activity_type_id,
api_method_name,
campaign_id,
id as activity_id,
activity_date,
lead_id,
modifying_user as modifying_user_id,
new_value,
old_value,
primary_attribute_value,
primary_attribute_value_id
primary_attribute_value_id,
reason as change_reason,
request_id,
source as change_source
from base

)
Expand Down
14 changes: 12 additions & 2 deletions models/stg_marketo__activity_click_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ with base as (
), fields as (

select
id as activity_id,
activity_date as activity_timestamp,
activity_type_id,
campaign_id,
campaign_run_id,
choice_number,
device as click_device,
email_template_id,
lead_id
id as activity_id,
is_mobile_device,
lead_id,
link as click_link_url,
platform as user_platform,
primary_attribute_value,
primary_attribute_value_id,
step_id,
user_agent
from base

), surrogate as (
Expand Down
15 changes: 12 additions & 3 deletions models/stg_marketo__activity_email_bounced.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ with base as (

), fields as (

select
id as activity_id,
select
activity_date as activity_timestamp,
activity_type_id,
campaign_id,
campaign_run_id,
category as bounce_category,
choice_number,
details,
email as email_address,
email_template_id,
lead_id
id as activity_id,
lead_id,
primary_attribute_value,
primary_attribute_value_id,
step_id,
subcategory as bounce_subcategory
from base

), surrogate as (
Expand Down
9 changes: 7 additions & 2 deletions models/stg_marketo__activity_email_delivered.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ with base as (
), fields as (

select
id as activity_id,
activity_date as activity_timestamp,
activity_type_id,
campaign_id,
campaign_run_id,
choice_number,
email_template_id,
lead_id
id as activity_id,
lead_id,
primary_attribute_value,
primary_attribute_value_id,
step_id
from base

), surrogate as (
Expand Down
13 changes: 11 additions & 2 deletions models/stg_marketo__activity_open_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ with base as (
), fields as (

select
id as activity_id,
activity_date as activity_timestamp,
activity_type_id,
campaign_id,
campaign_run_id,
choice_number,
device,
email_template_id,
lead_id
id as activity_id,
is_mobile_device,
lead_id,
platform,
primary_attribute_value,
primary_attribute_value_id,
step_id,
user_agent
from base

), surrogate as (
Expand Down
9 changes: 7 additions & 2 deletions models/stg_marketo__activity_send_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ with base as (
), fields as (

select
id as activity_id,
activity_date as activity_timestamp,
activity_type_id,
campaign_id,
campaign_run_id,
choice_number,
email_template_id,
lead_id
id as activity_id,
lead_id,
primary_attribute_value,
primary_attribute_value_id,
step_id
from base

), surrogate as (
Expand Down
16 changes: 13 additions & 3 deletions models/stg_marketo__activity_unsubscribe_email.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ with base as (

), fields as (

select
id as activity_id,
select
activity_date as activity_timestamp,
activity_type_id,
campaign_id,
campaign_run_id,
client_ip_address,
email_template_id,
lead_id
form_fields,
id as activity_id,
lead_id,
primary_attribute_value,
primary_attribute_value_id,
query_parameters,
referrer_url,
user_agent,
webform_id,
webpage_id
from base

), surrogate as (
Expand Down
3 changes: 2 additions & 1 deletion models/stg_marketo__campaigns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ with base as (
), fields as (

select
id as campaign_id,
active as is_active,
created_at as created_timestamp,
description,
id as campaign_id,
name as campaign_name,
program_id,
program_name,
type as campaign_type,
updated_at as updated_timestamp,
workspace_name
from base

Expand Down
26 changes: 22 additions & 4 deletions models/stg_marketo__email_template_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,29 @@ with base as (
), fields as (

select
id as email_template_id,
updated_at as updated_timestamp,
created_at as created_timestamp,
description,
operational as is_operational
folder_folder_name as folder_name,
folder_id,
folder_type,
folder_value,
from_email,
from_name,
id as email_template_id,
name as email_template_name,
operational as is_operational,
program_id,
publish_to_msi,
reply_email,
status as email_template_status,
subject as email_subject,
template as parent_template_id,
text_only as is_text_only,
updated_at as updated_timestamp,
url as email_template_url,
version as version_type,
web_view as has_web_view_enabled,
workspace as workspace_name
from base

), versions as (
Expand All @@ -24,7 +42,7 @@ with base as (
), valid as (

select
*,
* except (total_count_of_versions),
case
when inferred_version = 1 then created_timestamp
else updated_timestamp
Expand Down
4 changes: 3 additions & 1 deletion models/stg_marketo__lead.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ with base as (

select
id as lead_id,
{{ dbt_utils.star(from=ref('stg_marketo__lead_adapter'), except=['id']) }}
created_at as created_timestamp,
updated_at as updated_timestamp,
{{ dbt_utils.star(from=ref('stg_marketo__lead_adapter'), except=['id', 'created_at', 'updated_at']) }}
from base

)
Expand Down
8 changes: 7 additions & 1 deletion models/stg_marketo__lead_describe.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ with base as (
), fields as (

select
data_type,
display_name,
id as lead_describe_id,
restname
length as field_max_length,
restname as rest_name,
restread_only as is_rest_readonly,
soapname as soap_name,
soapread_only as is_soap_readonly
from base

)
Expand Down

0 comments on commit c886b6c

Please sign in to comment.