incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: SQL Server to Cassandra Schema Design - Ideas Anyone?
Date Thu, 24 Jun 2010 21:25:16 GMT
the main idea is "denormalize your data into multiple CFs at write
time so that each CF lets you answer a query from a single row."

http://www.rackspacecloud.com/blog/2010/05/12/cassandra-by-example/ is
a good place to start.

On Tue, Jun 22, 2010 at 3:43 PM, Craig Faulkner
<craig.faulkner@wallst.com> wrote:
> I'm having a little block in converting an existing SQL Server schema that we have into
Cassandra Keyspace(s).  The whole key-value thing has just not clicked yet.  Do any of you
know of any good examples that are more complex than the example in the readme file?
>
> We are looking to report on web traffic so things like hits, page views, unique visitors,...
 All the basic web stuff.  I'm very sure that one of you, likely many more, is already doing
this.
>
> Here are two queries just to give you a few key works related to the metrics that we
want to move into Cassandra:
>
>
> /* Data logged */
> select t.Datetime,c.CustomerNumber,ct.cust_type,ws.SiteNumber,ws.SiteName
> ,f.Session,wa.page,wa.Note,f.CPUTime,f.DCLWaitTime,f.DCLRequestCount,'clientip' = dbo.u_IpInt2Str(ClientIP)
> from warehouse.dbo.fact_WebHit f
> join Warehouse.dbo.dim_Time t
>      on t.ID = f.TimeID
> join Warehouse.dbo.dim_CustomerType ct
>      on ct.ID = f.CustomerTypeID
> join Warehouse.dbo.dim_Customer c
>      on c.ID = f.CustomerID
> join Warehouse.dbo.dim_Symbol s
>      on s.ID = f.SymbolID
> join Warehouse.dbo.dim_WebAction wa
>      on wa.ID = f.WebActionID
> join Warehouse.dbo.dim_WebSite ws
>      on ws.ID = f.WebSiteID
>
> /* Data with surrogate keys */
> select f.Timeid,f.CustomerID,f.CustomerTypeID,f.WebSiteID ,f.Session,f.WebActionID,f.CPUTime
> ,f.DCLWaitTime,f.DCLRequestCount,ClientIP
> from warehouse.dbo.fact_WebHit f
>
>
> Any good info would be appreciated.  I have of course checked the main web sites but
I could have missed something along the way.
>
> Craig
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Mime
View raw message