Skip to content

Instantly share code, notes, and snippets.

@sankars
Created March 15, 2020 14:36
Show Gist options
  • Save sankars/01fd25a9033d6e29d812dd9f67dc98c1 to your computer and use it in GitHub Desktop.
Save sankars/01fd25a9033d6e29d812dd9f67dc98c1 to your computer and use it in GitHub Desktop.
One liner to replicate hive database schema
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