master #59

Closed
claudio.atzori wants to merge 3221 commits from master into stable_ids
1 changed files with 3 additions and 3 deletions
Showing only changes of commit 706092bc19 - Show all commits

View File

@ -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!"