Skip to content

Commit

Permalink
Create copy_tpch_dataset.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
data-sleek committed Mar 12, 2022
1 parent 9305660 commit df2605e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions copy_tpch_dataset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
targetdir=/mnt/volume_sfo3_01/dataset

# loop using array
array=( customer lineitem nation orders part partsupp region supplier )
for i in "${array[@]}"
do
echo "Compressing ${i}.tbl ..."
gzip /mnt/volume_sfo3_01/dataset/${i}.tbl
echo "Copying ${i}.tbl.gz ..."
aws s3 cp ${targetdir}/${i}.tbl.gz s3://datasleek-datasets/tpch100/${i}.tbl.gz
done

# loop using array

array=( customer lineitem nation orders part partsupp region supplier )
for i in "${array[@]}"
do

echo "Copying ${i}.tbl.gz ..."
aws s3 cp s3://datasleek-datasets/tpch100/${i}.tbl.gz ${targetdir}/
echo "Unzip ${i}.tbl.gz ..."
gunzip /mnt/volume_sfo3_01/dataset/${i}.tbl.gz
done




0 comments on commit df2605e

Please sign in to comment.