Skip to content

Commit c239779

Browse files
max-ostapenkoGCP Dataform
authored andcommitted
add reservations
1 parent 924b89f commit c239779

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

definitions/output/crawl/pages.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ publish('pages', {
8282
tags: ['crawl_complete'],
8383
dependOnDependencyAssertions: true
8484
}).preOps(ctx => `
85+
SET @@RESERVATION='projects/httparchive/locations/US/reservations/enterprise';
86+
8587
DELETE FROM ${ctx.self()}
8688
WHERE date = '${constants.currentMonth}' AND
8789
client = 'desktop';
@@ -105,6 +107,8 @@ WHERE date = '${constants.currentMonth}' AND
105107
client = 'mobile'
106108
${constants.devRankFilter}
107109
`).postOps(ctx => `
110+
SET @@RESERVATION='none';
111+
108112
CREATE TEMP TABLE technologies_cleaned AS (
109113
WITH technologies AS (
110114
SELECT DISTINCT

definitions/output/crawl/parsed_css.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ publish('parsed_css', {
99
},
1010
tags: ['crawl_complete']
1111
}).preOps(ctx => `
12+
SET @@RESERVATION='projects/httparchive/locations/US/reservations/enterprise';
13+
1214
DELETE FROM ${ctx.self()}
1315
WHERE date = '${constants.currentMonth}'
1416
AND client = 'desktop';

definitions/output/crawl/requests.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ publish('requests', {
3838
},
3939
tags: ['crawl_complete']
4040
}).preOps(ctx => `
41+
SET @@RESERVATION='projects/httparchive/locations/US/reservations/enterprise';
42+
4143
FOR client_var IN (SELECT * FROM UNNEST(['desktop', 'mobile']) AS value) DO
4244
FOR is_root_page_var IN (SELECT * FROM UNNEST([TRUE, FALSE]) AS value) DO
4345
FOR rank_lt_50M_var IN (SELECT * FROM UNNEST([TRUE, FALSE]) AS value) DO
@@ -47,7 +49,7 @@ FOR client_var IN (SELECT * FROM UNNEST(['desktop', 'mobile']) AS value) DO
4749
WHERE date = '${constants.currentMonth}' AND
4850
client = client_var.value AND
4951
is_root_page = is_root_page_var.value AND
50-
(rank < 50000000) = rank_lt_50M_var.value;
52+
(rank < 50000000) = rank_lt_50M_var.value;
5153
5254
-- Insert new entries
5355
INSERT INTO ${ctx.self()}

0 commit comments

Comments
 (0)