From 770f21b3180866919630a4d6b3077269c5c925ed Mon Sep 17 00:00:00 2001 From: Amisha Singla Date: Tue, 29 Oct 2024 15:02:43 -0500 Subject: [PATCH] slightly better format --- scripts/update_data_schema_changelog.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/update_data_schema_changelog.sh b/scripts/update_data_schema_changelog.sh index 29535e00..29bec855 100644 --- a/scripts/update_data_schema_changelog.sh +++ b/scripts/update_data_schema_changelog.sh @@ -1,6 +1,6 @@ #!/bin/bash -result=$(bq query --nouse_legacy_sql \ +result=$(bq query --format=prettyjson --nouse_legacy_sql \ 'SELECT date(detected_at) as date , database_name @@ -15,13 +15,11 @@ result=$(bq query --nouse_legacy_sql \ ORDER BY 1 DESC, 2 DESC, 3 DESC, 4 ASC ') -# result=$(bq query --nouse_legacy_sql 'SELECT count(*) from `hubble-261722`.crypto_stellar_internal_2.country_code') echo "# Changes in data schema" -echo "$result" -# echo "" +echo "" -# echo "| Date | Database Name | Schema Name | Table Name | Sub Type | Columns |" -# echo "|------------|---------------|-------------|--------------------------------|--------------|--------------------------|" +echo "| Date | Database Name | Schema Name | Table Name | Sub Type | Columns |" +echo "|------------|---------------|-------------|--------------------------------|--------------|--------------------------|" -# echo "$result" | jq -r '.[] | "| \(.date) | \(.database_name) | \(.schema_name) | \(.table_name) | \(.sub_type) | \(.columns | join(", ")) |"' +echo "$result" | jq -r '.[] | "| \(.date) | \(.database_name) | \(.schema_name) | \(.table_name) | \(.sub_type) | \(.columns | join(", ")) |"'