scala - Create table from SQL query in Spark (v.1.5.2) -
i have quite straightforward question, how can create table sql query in spark(1.5.2)
?
i have seen in standard sql server 2008
, solved following way:
select * new_table old_table
is there similar formula in spark not require use .filter()
in dataframe
?
first save dataframe "old_table" table
df.registertemptable("old_table")
read old table new dataframe
val newdf=sqlcontext.sql("select * old_table ")
save again spark sql
newdf.registertemptable("new_table")
Comments
Post a Comment