Skip to content

Commit d05e64d

Browse files
Just add debug option for two scripts
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent 207c18a commit d05e64d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

utils/lookup_store_ddb.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ then
1111
export STAGE=dev
1212
fi
1313

14+
if [ ! -z "${DEBUG}" ]
15+
then
16+
echo "aws --profile \"lfproduct-${STAGE}\" dynamodb get-item --table-name \"cla-${STAGE}-store\" --key '{\"key\": {\"S\": \"${1}\"}}' | jq -r '.'"
17+
fi
1418
aws --profile "lfproduct-${STAGE}" dynamodb get-item --table-name "cla-${STAGE}-store" --key "{\"key\": {\"S\": \"${1}\"}}" | jq -r '.'

utils/lookup_store_sf.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ then
1212
fi
1313
if [ "${STAGE}" = "prod" ]
1414
then
15+
if [ ! -z "${DEBUG}" ]
16+
then
17+
echo "snowsql $(cat ./snowflake.secret) -o friendly=false -o header=false -o timing=false -o output_format=plain -q \"select data from fivetran_ingest.dynamodb_product_us_east_1.cla_prod_store where key = '${1}'\" | jq -r '.'"
18+
fi
1519
snowsql $(cat ./snowflake.secret) -o friendly=false -o header=false -o timing=false -o output_format=plain -q "select data from fivetran_ingest.dynamodb_product_us_east_1.cla_prod_store where key = '${1}'" | jq -r '.'
1620
else
21+
if [ ! -z "${DEBUG}" ]
22+
then
23+
echo "snowsql $(cat ./snowflake.secret) -o friendly=false -o header=false -o timing=false -o output_format=plain -q \"select data from fivetran_ingest.dynamodb_product_us_east1_dev.cla_dev_store where key = '${1}'\" | jq -r '.'"
24+
fi
1725
snowsql $(cat ./snowflake.secret) -o friendly=false -o header=false -o timing=false -o output_format=plain -q "select data from fivetran_ingest.dynamodb_product_us_east1_dev.cla_dev_store where key = '${1}'" | jq -r '.'
1826
fi

0 commit comments

Comments
 (0)