Skip to content

Instantly share code, notes, and snippets.

@shiumachi
Created September 2, 2016 02:54
Show Gist options
  • Save shiumachi/76f0692e81080b9b339ea1db762294d3 to your computer and use it in GitHub Desktop.
Save shiumachi/76f0692e81080b9b339ea1db762294d3 to your computer and use it in GitHub Desktop.
create Hive table with 100K columns
COLS=100000
with open("/tmp/create_table_with_many_columns.hql", "w") as f:
f.write("CREATE TABLE many_cols_tbl (\n")
for i in xrange(COLS):
f.write("id%d INT,\n" % (i,))
f.write("last_id INT);\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment