phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Agarwal <vi...@infoobjects.com>
Subject Query for One-to-Many relationship
Date Mon, 16 Feb 2015 15:10:43 GMT
Hi,

I was looking for query and Java code for the data model represented here
<http://wiki.apache.org/hadoop/Hbase/DataModel>.

Example query:

select info.title, comment_title.*, comment_author.* from blogtable where
rowkey=<some_row_key>;

Now how would we store the result in Java data structures? I don't think it
would return array of comment_title, comment_author. I am wondering if
somehow we can gather results as proper object hierarchy like

{
    title: <blog title>,
    comments: [
        {
            title: <comment_title>,
            author: <comment_author>
        }
    ]
}

-- 
Regards,
Vikas Agarwal
91 – 9928301411

InfoObjects, Inc.
Execution Matters
http://www.infoobjects.com
2041 Mission College Boulevard, #280
Santa Clara, CA 95054
+1 (408) 988-2000 Work
+1 (408) 716-2726 Fax

Mime
View raw message