Skip to content

Commit

Permalink
slightly better format
Browse files Browse the repository at this point in the history
  • Loading branch information
amishas157 committed Oct 29, 2024
1 parent 9359a4c commit 770f21b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions scripts/update_data_schema_changelog.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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(", ")) |"'

0 comments on commit 770f21b

Please sign in to comment.