Created
June 21, 2018 12:58
-
-
Save markrittman/2bb637c25f73224ed9ab2c3860841f7f to your computer and use it in GitHub Desktop.
check_materialization_logs.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$#" -ne 1 ] | |
then | |
echo "Usage: ./check_materialization_logs.sh tracking_id i.e. check_materialization_logs.sh dnata_travel" | |
exit 1 | |
fi | |
echo "checking status of tracking_id $1" | |
gcloud auth login mark.rittman@qubit.com | |
gcloud config set project qubit-datateam | |
bq query "SELECT * from [qubit-datateam:livetap.bi_data_completeness_streamed_log] where meta_trackingId = '"${1}"' and ts = (select max(ts) from livetap.bi_data_completeness_streamed_log where meta_trackingId = '"${1}"') order by ts desc" | |
bq query "SELECT ts,unique_id, tracking_id, processed_date, status FROM [qubit-datateam:livetap.bi_data_materialisation_streamed_log] WHERE tracking_id = '"${1}"' order by ts desc limit 15" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment