spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Armbrust <mich...@databricks.com>
Subject Re: Shark Direct insert into table value (?)
Date Thu, 03 Apr 2014 19:13:54 GMT
This should soon be possible with Spark SQL.  PR-195 adds support for
INSERT statements in SparkSQL and SPARK-1366 will let you use this syntax
on Hive tables.  Both of these should be included in the 1.0 release.  The
result would look something like this:

sql("INSERT INTO emp SELECT 212,'Abhi'")

That said, this is not what Hive is really designed for.  Each time you
insert a single row you are firing up a whole spark job to do it.  Even
worse, each row will be contained in its own file, which will result in
lots of small files and thus HDFS performance problems.  If you want to do
single row updates you should probably be looking at something like HBase
or Cassandra.

On Wed, Apr 2, 2014 at 8:02 PM, qingyang li <liqingyang1985@gmail.com>wrote:

> for now , it does not support direct insert.
>
>
> 2014-04-03 10:52 GMT+08:00 abhietc31 <abhietc@gmail.com>:
>
> Hi,
>> I'm trying to run script  in SHARK(0.81)  " insert into emp  (id,name)
>> values (212,"Abhi") " but it doesn't work.
>> I urgently need direct insert as it is show stopper.
>>
>> I know that we can do " insert into emp select * from xyz".
>> Here requirement is direct insert.
>>
>> Does any one tried it ? Or is there SHARK API that allow us to do it ?
>>
>> Please assist.
>>
>> Thanks,
>> Abhishek
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-user-list.1001560.n3.nabble.com/Shark-Direct-insert-into-table-value-tp3684.html
>> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>>
>
>

Mime
View raw message