apache spark - How do I create external Hive Table based on existing Orc file? -
i have orc files produced spark job. there easy way create external table directly files?
the way have done first register temp table in spark job , leverage sql method of hivecontext create new table in hive using data temp table. example if have dataframe df , hivecontext hc general process is:
df.registertemptable("my_temp_table") hc.sql("create table new_table_name stored orc select * my_temp_table")
Comments
Post a Comment