Created
March 15, 2020 14:36
-
-
Save sankars/01fd25a9033d6e29d812dd9f67dc98c1 to your computer and use it in GitHub Desktop.
One liner to replicate hive database schema
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
SRC_DB_NAME="src"; TGT_DB_NAME="tgt"; for Table in $HiveTables; do ; hive -e "CREATE TABLE $TGT_DB_NAME.$Table LIKE $SRC_DB_NAME.$Table;"; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment