Skip to content

Commit fdc6701

Browse files
Fix unified migration script (#1136)
1 parent 8c2bb7e commit fdc6701

File tree

1 file changed

+8
-3
lines changed
  • docs/modeling-your-data/modeling-your-data-with-dbt/migration-guides/web_to_unified

1 file changed

+8
-3
lines changed

docs/modeling-your-data/modeling-your-data-with-dbt/migration-guides/web_to_unified/index.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -389,23 +389,28 @@ create view (your_schema)_derived.mock_snowplow_web_page_views as (
389389
ua__useragent_minor as useragent_minor,
390390
ua__useragent_patch as useragent_patch,
391391
ua__useragent_version as useragent_version,
392-
null as os_family,
392+
ua__os_family as os_family,
393393
ua__os_major as os_major,
394394
ua__os_minor as os_minor,
395395
ua__os_patch as os_patch,
396396
ua__os_patch_minor as os_patch_minor,
397397
ua__os_version as os_version,
398398
ua__device_family as device_family,
399399
yauaa__device_class as device_class,
400-
device_category,
400+
case
401+
when device_class = 'Desktop' then 'Desktop'
402+
when device_class = 'Phone' then 'Mobile'
403+
when device_class = 'Tablet' then 'Tablet'
404+
else 'Other'
405+
end as device_category,
401406
screen_resolution,
402407
yauaa__agent_class as agent_class,
403408
yauaa__agent_name as agent_name,
404409
yauaa__agent_name_version as agent_name_version,
405410
yauaa__agent_name_version_major as agent_name_version_major,
406411
yauaa__agent_version as agent_version,
407412
yauaa__agent_version_major as agent_version_major,
408-
null as device_brand,
413+
yauaa__device_brand as device_brand,
409414
yauaa__device_name as device_name,
410415
yauaa__device_version as device_version,
411416
yauaa__layout_engine_class as layout_engine_class,

0 commit comments

Comments
 (0)