File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ IMPORT=true source script/glam/run_glam_sql
1111function generate_and_run_sql {
1212 local probe_type=$1
1313 local windows_release_sample_percent=$2
14- local process=$3
14+ local use_slots=$3
15+ local process=$4
1516 local script_type
1617 local destination_table
1718 local write_disposition
@@ -60,12 +61,12 @@ function generate_and_run_sql {
6061 run_query " clients_daily_${script_type} _aggregates_v1" \
6162 true 0 99 " clients_daily_${probe_type} _aggregates_${table_name_suffix} v1" \
6263 " $write_disposition --clustering_fields=app_version,channel --time_partitioning_field=submission_date" \
63- " $( if [[ -n $windows_release_sample_percent ]]; then echo $windows_release_sample_percent ; fi) "
64-
64+ " $( if [[ -n $windows_release_sample_percent ]]; then echo $windows_release_sample_percent ; fi) " \
65+ " $( if [[ -n $use_slots ]] ; then echo $use_slots ; fi ) "
6566}
6667
6768probe_types=${1:- " scalar" " keyed_boolean" " keyed_scalar" " histogram" " keyed_histogram" }
6869
6970for probe_type in ${probe_types[@]} ; do
70- generate_and_run_sql $probe_type $2 $3
71+ generate_and_run_sql $probe_type $2 $3 $4
7172done
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ function run_query {
5252 local query_location=${5:- $destination_table }
5353 local additional_arguments=" ${6:- --replace} "
5454 local sample_size=${7:- 10}
55+ local use_slots=${8:- true}
5556 local query=" sql/$PROJECT /$PROD_DATASET /$query_location /query.sql"
5657
5758 # add an option to write to a time-partitioned table
@@ -74,6 +75,7 @@ function run_query {
7475 --parameter=" max_sample_id:INT64:$max_sample_id " \
7576 --parameter=" sample_size:INT64:$sample_size " \
7677 " $( if $time_partition ; then echo --time_partitioning_type=" DAY" ; fi) " \
78+ " $( if $use_slots ; then echo --reservation_id=glam; fi) " \
7779 < " $tmp "
7880}
7981
You can’t perform that action at this time.
0 commit comments