From 29295f050733ac5e612aa1a2ec645f85d8d7445b Mon Sep 17 00:00:00 2001 From: Anna Scholtz Date: Tue, 31 Mar 2020 13:55:58 -0700 Subject: [PATCH] Add comments to refactored scripts --- script/generate_views | 10 +++++++++- script/publish_metadata | 2 ++ script/publish_public_data_views | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/script/generate_views b/script/generate_views index a99cad9b89..378dc44168 100755 --- a/script/generate_views +++ b/script/generate_views @@ -1,5 +1,13 @@ #!/bin/sh +# Generate one view definition file per document type in '_stable' tables. +# +# If there are existing view definitions in the destination directory then those will be +# kept instead. +# +# Run as: +# ./script/generate_views 'moz-fx-data-shared-prod:*_stable.*' + cd "$(dirname "$0")/.." -exec python3 -m bigquery_etl.generate_views "$@" \ No newline at end of file +exec python3 -m bigquery_etl.generate_views "$@" diff --git a/script/publish_metadata b/script/publish_metadata index 06d143d8fe..f4920ef160 100755 --- a/script/publish_metadata +++ b/script/publish_metadata @@ -1,5 +1,7 @@ #!/bin/sh +# Update metadata of BigQuery tables and views. + cd "$(dirname "$0")/.." exec python3 -m bigquery_etl.publish_metadata "$@" diff --git a/script/publish_public_data_views b/script/publish_public_data_views index a9b5813165..4bd6b1a223 100755 --- a/script/publish_public_data_views +++ b/script/publish_public_data_views @@ -1,5 +1,11 @@ #!/bin/sh +# Generate and publish views for publicly available tables. +# Generate view definitions for queries that are written to the +# public data project and execute them. Views are published to +# an internal project so that data is also accessible in private +# datasets. + cd "$(dirname "$0")/.." exec python3 -m bigquery_etl.public_data.publish_public_data_views "$@"