Commit 86fba451 by chenyuanjie

pinterest脏数据调整

parent 7ea83726
...@@ -171,7 +171,9 @@ FROM ( ...@@ -171,7 +171,9 @@ FROM (
title, title,
CAST(annotations AS ARRAY<STRING>) AS annotations_arr, CAST(annotations AS ARRAY<STRING>) AS annotations_arr,
saves, saves,
str_to_date(substr(pin_created_at, 6, 20), '%d %b %Y %H:%i:%s') AS pin_created_at, -- 异常值置空:发布时间晚于当前UTC时间
CASE WHEN str_to_date(substr(pin_created_at, 6, 20), '%d %b %Y %H:%i:%s') > utc_timestamp() THEN NULL
ELSE str_to_date(substr(pin_created_at, 6, 20), '%d %b %Y %H:%i:%s') END AS pin_created_at,
domain, domain,
tracked_link, tracked_link,
board_name, board_name,
...@@ -179,7 +181,8 @@ FROM ( ...@@ -179,7 +181,8 @@ FROM (
updated_at AS pin_crawl_date, updated_at AS pin_crawl_date,
reactions, reactions,
share_count, share_count,
repin_count, -- 异常值置空:转存数为负
CASE WHEN repin_count < 0 THEN NULL ELSE repin_count END AS repin_count,
comment_count, comment_count,
creator_name, creator_name,
CONCAT('https://www.pinterest.com/', NULLIF(TRIM(creator_username), ''), '/') AS creator_link, CONCAT('https://www.pinterest.com/', NULLIF(TRIM(creator_username), ''), '/') AS creator_link,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment