Skip to content

Commit

Permalink
remove null elements from output
Browse files Browse the repository at this point in the history
json files now clean of null elements and ready to be resubmitted to startree API
  • Loading branch information
Keith committed Mar 21, 2023
1 parent 3977ec2 commit 99ab597
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/backup_all_tables_and_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mkdir -p backups
for i in `startree table listTables | jq -r '.tables | .[]'`
do
echo | startree table getConfig --tableName $i | jq '.' > $i.json
echo | startree table getConfig --tableName $i | jq 'del(..|select(. == null))' > $i.json
mv $i.json backups
printf "$i backup created \n"
done
Expand Down
2 changes: 1 addition & 1 deletion examples/backup_and_process_tableConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
mkdir -p backups
for i in `startree table listTables | jq -r '.tables | .[]'`
do
echo | startree table getConfig --tableName $i | jq '.' > $i.json
echo | startree table getConfig --tableName $i | jq 'del(..|select(. == null))' > $i.json


if [ `jq -r .realtime.tableType $i.json` = "REALTIME" ]
Expand Down

0 comments on commit 99ab597

Please sign in to comment.