Created
March 20, 2019 05:39
-
-
Save polleyg/ef1e0f2fe0471de935518f1a34792a2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export SOURCE_DATASET=$1 # project1:dataset | |
export DEST_PREFIX=$2 # project2:dataset2.any_prefix_ | |
for f in `bq ls $SOURCE_DATASET |grep TABLE | awk '{print $1}'` | |
do | |
export CP_COMMAND="bq cp $SOURCE_DATASET.$f $DEST_PREFIX$f" | |
echo $CP_COMMAND | |
echo `$CP_COMMAND` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment