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

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -