Re: Defining DataSet.json for cassandra-unit testing

2014-12-16 Thread Ryan Svihla
I'd ask the author of cassandra-unit. I've not personally used that project.

On Tue, Dec 16, 2014 at 8:00 AM, Chamila Wijayarathna <
cdwijayarat...@gmail.com> wrote:
>
> Hello all,
>
> I am trying to test my application using cassandra-unit with following
> schema and data given below.
>
> CREATE TABLE corpus.bigram_time_category_ordered_frequency (
> id bigint,
> word1 varchar,
> word2 varchar,
> year int,
> category varchar,
> frequency int,
> PRIMARY KEY((year, category),frequency,word1,word2));
>
> year | category | frequency | word1| word2   | id
> --+--+---+--+-+---
>  2014 |N | 1 |සියළුම | යුද්ධ |   664
>  2014 |N | 1 |එච් |   කාණ්ඩය | 12526
>  2014 |N | 1 |ගජබා | සුපර්ක්‍රොස් | 25779
>  2014 |N | 1 |  බී|   කාණ්ඩය | 12505
>
> Since this has a compound primary key, I am not clear with how to define
> dataset.json [1] for this CF. Can somebody help me on how to do that?
>
> Thank You!
>
> 1.
> https://github.com/jsevellec/cassandra-unit/wiki/What-can-you-set-into-a-dataSet
>
> --
> *Chamila Dilshan Wijayarathna,*
> SMIEEE, SMIESL,
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa.
>


-- 

[image: datastax_logo.png] 

Ryan Svihla

Solution Architect

[image: twitter.png]  [image: linkedin.png]


DataStax is the fastest, most scalable distributed database technology,
delivering Apache Cassandra to the world’s most innovative enterprises.
Datastax is built to be agile, always-on, and predictably scalable to any
size. With more than 500 customers in 45 countries, DataStax is the
database technology and transactional backbone of choice for the worlds
most innovative companies such as Netflix, Adobe, Intuit, and eBay.


Defining DataSet.json for cassandra-unit testing

2014-12-16 Thread Chamila Wijayarathna
Hello all,

I am trying to test my application using cassandra-unit with following
schema and data given below.

CREATE TABLE corpus.bigram_time_category_ordered_frequency (
id bigint,
word1 varchar,
word2 varchar,
year int,
category varchar,
frequency int,
PRIMARY KEY((year, category),frequency,word1,word2));

year | category | frequency | word1| word2   | id
--+--+---+--+-+---
 2014 |N | 1 |සියළුම | යුද්ධ |   664
 2014 |N | 1 |එච් |   කාණ්ඩය | 12526
 2014 |N | 1 |ගජබා | සුපර්ක්‍රොස් | 25779
 2014 |N | 1 |  බී|   කාණ්ඩය | 12505

Since this has a compound primary key, I am not clear with how to define
dataset.json [1] for this CF. Can somebody help me on how to do that?

Thank You!

1.
https://github.com/jsevellec/cassandra-unit/wiki/What-can-you-set-into-a-dataSet

-- 
*Chamila Dilshan Wijayarathna,*
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.