master #59
|
@ -10,7 +10,7 @@ export SOURCE=$1
|
||||||
export PRODUCTION=$2
|
export PRODUCTION=$2
|
||||||
|
|
||||||
echo "Updating ${PRODUCTION} database"
|
echo "Updating ${PRODUCTION} database"
|
||||||
impala-shell -q "create database if not exists ${PRODUCTION}"
|
impala-shell -i impala-cluster-dn1.openaire.eu -q "create database if not exists ${PRODUCTION}"
|
||||||
impala-shell -d ${PRODUCTION} -q "show tables" --delimited | sed "s/^/drop view if exists ${PRODUCTION}./" | sed "s/$/;/" | impala-shell -c -f -
|
impala-shell -i impala-cluster-dn1.openaire.eu -d ${PRODUCTION} -q "show tables" --delimited | sed "s/^/drop view if exists ${PRODUCTION}./" | sed "s/$/;/" | impala-shell -i impala-cluster-dn1.openaire.eu -c -f -
|
||||||
impala-shell -d ${SOURCE} -q "show tables" --delimited | sed "s/\(.*\)/create view ${PRODUCTION}.\1 as select * from ${SOURCE}.\1;/" | impala-shell -c -f -
|
impala-shell -i impala-cluster-dn1.openaire.eu -d ${SOURCE} -q "show tables" --delimited | sed "s/\(.*\)/create view ${PRODUCTION}.\1 as select * from ${SOURCE}.\1;/" | impala-shell -i impala-cluster-dn1.openaire.eu -c -f -
|
||||||
echo "Production db ready!"
|
echo "Production db ready!"
|
Loading…
Reference in New Issue