You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Lu Niu <qq...@gmail.com> on 2015/11/06 07:38:22 UTC

Fwd: store avro to cassandra

Hi, cassandra users

my data is in avro format and the schema is huge. Is there any way that I
can automatically convert the avro schema to the schema that cassandra
could use? also, the api that I could store and fetch the data? Thank you!

Best,
Lu

Re: store avro to cassandra

Posted by Jack Krupansky <ja...@gmail.com>.
Use a Cassandra map column - the keys of the map can be arbitrary. But if
there are some standard set of columns that are always or commonly present,
make them explicit Cassandra columns. And if the avro values have different
types, you may want to have several Cassandra map columns, one for each
value type you need to distinguish on queries. In some cases you might want
to use user defined types (UDT.)

-- Jack Krupansky

On Fri, Nov 6, 2015 at 1:38 AM, Lu Niu <qq...@gmail.com> wrote:

>
> Hi, cassandra users
>
> my data is in avro format and the schema is huge. Is there any way that I
> can automatically convert the avro schema to the schema that cassandra
> could use? also, the api that I could store and fetch the data? Thank you!
>
> Best,
> Lu
>
>