Skip to content

Commit aae42c9

Browse files
committed
split into scripts
1 parent 4a0d5e9 commit aae42c9

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

definitions/output/f1/requests_latest.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,28 @@ SELECT
2828
response_body
2929
FROM ${ctx.ref('crawl', 'requests')}
3030
WHERE
31-
date = '${constants.currentMonth}'
31+
date = '${constants.currentMonth}' AND
32+
client = 'mobile'
33+
`).postOps(ctx => `
34+
INSERT INTO ${ctx.self()}
35+
SELECT
36+
date,
37+
client,
38+
page,
39+
is_root_page,
40+
root_page,
41+
rank,
42+
url,
43+
is_main_document,
44+
type,
45+
index,
46+
TO_JSON_STRING(payload) AS payload,
47+
TO_JSON_STRING(summary) AS summary,
48+
request_headers,
49+
response_headers,
50+
response_body
51+
FROM ${ctx.ref('crawl', 'requests')}
52+
WHERE date = '${constants.currentMonth}' AND
53+
client = 'desktop'
3254
`)
55+

0 commit comments

Comments
 (0)