Hi Jamie,
No, it's currently not possible to store value information in column
qualifiers. There is interest in support this, though, if it can be
done in a SQL friendly way: see PHOENIX-1497 and PHOENIX-150.

I think the best you can do is use two parallel arrays, but that
starts to break down if you have a 1:many relationship between key and
values. Another option would be to define a VIEW on-the-fly. Keep in
mind that DDL operations on views are cheap in Phoenix - they
essentially boil down to inserting a handful of rows in the system
catalog table.

Thanks,
James

On Fri, Dec 19, 2014 at 10:56 AM, Jamie Murray <jamie.mur...@d2l.com> wrote:
> Hey, thanks for the reply.
>
>
>
> I am not actually looking to map to multiple column families,  I am looking
> to have the column qualifiers be the values of the column families.  So in
> your example I would have “c” as my column and “column_1” as my value.  That
> is to say c:column_1, c:column_2 have a column name “c” and the value is an
> array [“column_1”, “column_2”].
>
>
>
> Thanks
>
>
>
> From: Imran Mohammed [mailto:imran.str...@gmail.com]
> Sent: December-19-14 11:58 AM
> To: user@phoenix.apache.org
> Subject: Re: Mapping to a table with arbitrary column qualifiers
>
>
>
> Yes, you can have view mapping to multiple column families on a existing
> table .
>
>
>
> CREATE VIEW "your_table_name"(PK VARCHAR PRIMARY KEY,
>
> "c"."column_1" VARCHAR ,"p"."column_2" VARCHAR)
>
>
>
> On Fri, Dec 19, 2014 at 9:19 AM, Jamie Murray <jamie.mur...@d2l.com> wrote:
>
> Hello,
>
>
>
> I am looking to map a phoenix view to an existing table. The existing table
> represents a graph structure in that each row references related rows using
> this format of (column family) : (column qualifier)
>
> c:{key}
>
> p:{key}
>
>
>
> Where c and p are column families and {key} references another rowkey in
> this table.  Ideally I would like to be able to map a Phoenix view in such a
> way that for each row we have column c: and the value is an array type of
> corresponding {key}.  Similarly, for each row we would have column p: and
> the value is also an array type of corresponding {key}.   Aside from this
> exact mapping, another question would be – Is it possible to map Phoenix
> onto an existing table and use the column qualifiers as values?
>
>
>
> Any help is appreciated!
>
>
>
> Thanks,
>
>
>
> Jamie

Reply via email to