forked from charlottevdscheun/spark-optimization-training
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcollect_data.sh
executable file
·31 lines (24 loc) · 891 Bytes
/
collect_data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
WITHCSV=0
for arg in "$@"
do
case $arg in
--with-csv)
WITHCSV=1
shift
;;
esac
done
if [ ! -f data/meteo-data/parquet.zip ]; then
wget -P data/meteo-data -q https://meteo-data.s3-eu-west-1.amazonaws.com/meteo-data/flag_description.csv
wget -P data/meteo-data https://meteo-data.s3-eu-west-1.amazonaws.com/meteo-data/observation_type.csv
wget -P data/meteo-data https://meteo-data.s3-eu-west-1.amazonaws.com/meteo-data/stations.csv
wget -P data/meteo-data https://meteo-data.s3-eu-west-1.amazonaws.com/meteo-data/parquet.zip
unzip data/meteo-data/parquet.zip -d data/meteo-data
rm -rf data/meteo-data/parquet.zip
if [ $WITHCSV == 1 ]; then
wget -P data/meteo-data https://meteo-data.s3-eu-west-1.amazonaws.com/meteo-data/csv.zip
unzip data/meteo-data/csv.zip -d data/meteo-data
rm -rf data/meteo-data/csv.zip
fi
fi