Surender Raja
Surender Raja

Reputation: 3599

How to put values inside multiple column families in hbase

I am looking for a hbase put command that can insert values into multiple column families for a same rowkey in hbase table

Let's say I have a hbase table named 'emp' with two column families such as 'personal' and 'educational'

I am applying the below command . It throws some syntax error

put 'emp' ,'100', 'personal:name', 'SURENDER', 'educational:degree', 'BTECH'

ERROR: no method 'add' for arguments (org.jruby.java.proxies.ArrayJavaProxy,org.jruby.java.proxies.ArrayJavaProxy,org.jruby.RubyString,org.jruby.java.proxies.ArrayJavaProxy) on Java::OrgApacheHadoopHbaseClient::Put

However if try separate put commands for each column family then it works

put 'emp', '100' ,'personal:name', 'SURENDER'
put 'emp', '100', 'educational:degree', 'BTECH'

Could anybody tell me what went wrong when I try to apply put command for 2 column families?

Upvotes: 1

Views: 1894

Answers (1)

Vignesh I
Vignesh I

Reputation: 2221

That is not possible. Put can only be applied to insert a single value.

Upvotes: 2

Related Questions