fix(GLAM): Fix boolean parameter passing to generate_glean_sql (#6155)
This commit is contained in:
Родитель
463807c661
Коммит
eaf434a834
|
@ -75,7 +75,7 @@ def main():
|
|||
parser.add_argument("--dataset", default="glam_etl")
|
||||
parser.add_argument("--sql-root", default="sql/")
|
||||
parser.add_argument("--daily-view-only", action="store_true", default=False)
|
||||
parser.add_argument("--use-sample-id", default=False)
|
||||
parser.add_argument("--use-sample-id", action="store_true", default=False)
|
||||
args = parser.parse_args()
|
||||
|
||||
env = Environment(loader=PackageLoader("bigquery_etl", "glam/templates"))
|
||||
|
|
|
@ -92,7 +92,7 @@ sql_dir=${sql_dir%/}
|
|||
|
||||
product=${PRODUCT?PRODUCT must be defined}
|
||||
stage=${STAGE?$error}
|
||||
use_sample_id=${USE_SAMPLE_ID:-False}
|
||||
use_sample_id=$( [ "$USE_SAMPLE_ID" = "True" ] && echo "--use-sample-id" || echo "")
|
||||
|
||||
# ensure the sql directory exists
|
||||
mkdir -p $sql_dir/$dst_project/glam_etl
|
||||
|
@ -109,7 +109,7 @@ elif [[ $stage == "incremental" ]]; then
|
|||
--sql-root "$sql_dir" \
|
||||
--project "$dst_project" \
|
||||
--prefix "${product}" \
|
||||
--use-sample-id "${use_sample_id}"
|
||||
${use_sample_id}
|
||||
elif [[ $stage == "all" ]]; then
|
||||
write_clients_daily_aggregates "$product" "$src_project" "$dst_project" "$sql_dir"
|
||||
python3 -m bigquery_etl.glam.generate \
|
||||
|
|
Загрузка…
Ссылка в новой задаче