Skip to content

Commit 1d4e2a9

Browse files
authored
Merge pull request #409 from m-lab/views
Update views to use base_tables as base.
2 parents 74dbf00 + e2cca65 commit 1d4e2a9

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ deploy:
349349
# Update these version numbers when making changes to the views.
350350
# TODO - add feature to allow making aliases from existing intermediate.
351351
pushd $TRAVIS_BUILD_DIR/schema/views_legacysql
352-
&&./make_views.sh measurement-lab intermediate_v3_1_1 rc_v3_1 "rc release"
352+
&& ./make_views.sh measurement-lab intermediate_v3_1_1 rc_v3_1 "rc release"
353353
&& cd $TRAVIS_BUILD_DIR/schema/views_standardsql
354354
&& ./make_views.sh measurement-lab intermediate_v3_1_1 rc_v3_1 "rc release"
355355
&& popd

schema/views_legacysql/common_etl.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ SELECT
7070
web100_log_entry.snap.X_Rcvbuf, web100_log_entry.snap.X_Sndbuf, web100_log_entry.snap.X_dbg1,
7171
web100_log_entry.snap.X_dbg2, web100_log_entry.snap.X_dbg3, web100_log_entry.snap.X_dbg4,
7272
web100_log_entry.snap.X_rcv_ssthresh, web100_log_entry.snap.X_wnd_clamp
73-
FROM [measurement-lab:public.ndt]
73+
FROM [measurement-lab:base_tables.ndt]
7474
WHERE _PARTITIONTIME >= TIMESTAMP("2017-05-11 00:00:00")

schema/views_legacysql/make_views.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Also creates internal views that the public views are built on.
44
# This should generally be run from a travis deployment, and the
55
# arguments should be derived from the deployment tag.
6-
# The following legacySQL views are created in the public dataset:
7-
# ndt_all​ - all (lightly filtered) tests, excluding EB,
6+
# The following legacySQL views are created in the rc/release datasets:
7+
# ndt_all​ - all (lightly filtered) tests, excluding EB,
88
# blacklisted, short and very long tests.
99
# Separate views for download and upload NDT tests:
1010
# ​​​ ndt_downloads
@@ -25,13 +25,13 @@ set -u
2525
# Bash Parameters #
2626
###########################################################################
2727

28-
USAGE="$0 <project> <internal-dataset> <public-dataset> <alias,alias,...>"
28+
USAGE="$0 <project> <intermediate-dataset> <rc-dataset> <alias,alias,...>"
2929
PROJECT=${1:?Please provide the google cloud project: $USAGE}
3030
INTERMEDIATE=${PROJECT}:${2:?Please specify the internal dataset e.g. intermediate_v3_1_1: $USAGE}
31-
PUBLIC=${PROJECT}:${3:?Please specify the public dataset e.g. rc_v3_1: $USAGE}
31+
PUBLIC=${PROJECT}:${3:?Please specify the release candidate dataset e.g. rc_v3_1: $USAGE}
3232
ALIASES=${4:?Please specify a single alias, or quoted space separated list of aliases \{rc|\"rc release\"|none\}: $USAGE}
3333

34-
# TODO - check that public and internal aren't swapped?
34+
# TODO - check that public and intermediate aren't swapped?
3535
# TODO - check that project is valid?
3636

3737

schema/views_standardsql/common_etl.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ SELECT
7575
web100_log_entry.snap.X_rcv_ssthresh, web100_log_entry.snap.X_wnd_clamp)
7676
AS snap)
7777
AS web100_log_entry
78-
FROM `measurement-lab.public.ndt`
78+
FROM `measurement-lab.base_tables.ndt`
7979
WHERE _PARTITIONTIME >= TIMESTAMP("2017-05-11 00:00:00")

schema/views_standardsql/make_views.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Also creates internal views that the public views are built on.
44
# This should generally be run from a travis deployment, and the
55
# arguments should be derived from the deployment tag.
6-
# The following standardSQL views are created in the public dataset:
6+
# The following standardSQL views are created in the rc/release dataset:
77
# ndt_all​ - all (lightly filtered) tests, excluding EB,
88
# blacklisted, short and very long tests.
99
# Separate views for download and upload NDT tests:
@@ -25,13 +25,13 @@ set -u
2525
# Bash Parameters #
2626
###########################################################################
2727

28-
USAGE="$0 <project> <internal-dataset> <public-dataset> <alias,alias,...>"
28+
USAGE="$0 <project> <intermediate-dataset> <rc-dataset> <alias,alias,...>"
2929
PROJECT=${1:?Please provide the google cloud project: $USAGE}
3030
INTERMEDIATE=${PROJECT}:${2:?Please specify the internal dataset e.g. intermediate_v3_1_1: $USAGE}
31-
PUBLIC=${PROJECT}:${3:?Please specify the public dataset e.g. rc_v3_1: $USAGE}
31+
PUBLIC=${PROJECT}:${3:?Please specify the release candidate dataset e.g. rc_v3_1: $USAGE}
3232
ALIASES=${4:?Please specify a single alias, or quoted space separated list of aliases \{rc|\"rc release\"|none\}: $USAGE}
3333

34-
# TODO - check that public and internal aren't swapped?
34+
# TODO - check that public and intermediate aren't swapped?
3535
# TODO - check that project is valid?
3636

3737

@@ -148,17 +148,17 @@ for ALIAS in $ALIASES; do
148148
if [ "${ALIAS}" != "none" ]; then
149149
echo "Linking ${PROJECT}:${ALIAS} alias"
150150

151-
create_view ${ALIAS} ndt_all \
151+
create_view ${PROJECT}:${ALIAS} ndt_all \
152152
'View across the all NDT data except EB and blacklisted' \
153153
'#standardSQL
154154
SELECT * FROM `'${INTERMEDIATE/:/.}'.ndt_all`'
155155

156-
create_view ${ALIAS} ndt_downloads \
156+
create_view ${PROJECT}:${ALIAS} ndt_downloads \
157157
'All good quality download tests' \
158158
'#standardSQL
159159
SELECT * FROM `'${INTERMEDIATE/:/.}'.ndt_downloads`'
160160

161-
create_view ${ALIAS} ndt_uploads \
161+
create_view ${PROJECT}:${ALIAS} ndt_uploads \
162162
'All good quality upload tests' \
163163
'#standardSQL
164164
SELECT * FROM `'${INTERMEDIATE/:/.}'.ndt_uploads`'

0 commit comments

Comments
 (0)