incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Faulkner <>
Subject SQL Server to Cassandra Schema Design - Ideas Anyone?
Date Tue, 22 Jun 2010 19:43:59 GMT
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

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.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
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.


View raw message