Skip to content

Instantly share code, notes, and snippets.

@M2shad0w
Created November 10, 2016 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M2shad0w/f08df53177f3dabe910725d5396cfbcb to your computer and use it in GitHub Desktop.
Save M2shad0w/f08df53177f3dabe910725d5396cfbcb to your computer and use it in GitHub Desktop.
hive auto 实例
HIVE_CMD = """
	hive -e "alter table track_event_data.track_event add partition(dt='%s');"
	"""       
# 在 hive 的 track event 中添加数据
cmd = HIVE_CMD % loop.strftime("%y-%m-%d")
log.info(cmd)
subprocess.check_call(cmd, shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment