Skip to content

Commit cd4493a

Browse files
committed
fix athena-s3-queries (pull bigdata on install, increase timeout)
1 parent fc18b15 commit cd4493a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

athena-s3-queries/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ install: ## Install dependencies
1010
# @test -e node_modules || npm install
1111
@which localstack || pip install localstack
1212
@which awslocal || pip install awscli-local
13+
docker pull localstack/bigdata
1314

1415
run: ## Set up database connections and run Athena queries locally
1516
@make install; \

athena-s3-queries/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ awslocal s3 mb s3://$BUCKET
1111
awslocal s3 cp data/data.csv $S3_INPUT
1212

1313
function wait_for_query {
14-
for i in {1..25}; do
14+
for i in {1..50}; do
1515
status=$(awslocal athena get-query-execution --query-execution-id $1 | jq -r '.QueryExecution.Status.State')
1616
echo Waiting for completion status of query $1: $status
1717
if [ "$status" != "RUNNING" ]; then
1818
return
1919
fi
2020
sleep 6
2121
done
22+
echo "Query did not finish in time. There seems to be a problem. Pleaes take a look at the LocalStack logs."
23+
exit 1
2224
}
2325

2426
echo Running queries to create database and table definitions...

0 commit comments

Comments
 (0)