Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
artkostm authored Nov 9, 2018
1 parent 8086808 commit 39f2795
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@

hive SET hive.cli.print.header=true;

echo "Task #1 is running"

echo "Creating tables..."

HOTELS_TABLE_NAME=$1
HOTELS_FILE_LOCATION=$2

hive --hiveconf -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
hive -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
-d HOTELS_FILE_LOCATION=${HOTELS_FILE_LOCATION} \
-f create_hotels_table.hql

hive --hiveconf -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
hive -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
-S -f select_top3_countries_with_succ_booking.hql

echo "Task #2 is running"

hive --hiveconf -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
hive -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
-S -f select_longest_period_of_stay.hql

echo "Task #3 is running"

hive --hiveconf -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
hive -d HOTELS_TABLE_NAME=${HOTELS_TABLE_NAME} \
-S -f select_top3_hotels_from_clicks.hql

echo "Done"

0 comments on commit 39f2795

Please sign in to comment.