cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lele Gaifax <>
Subject sstable2json timestamp format
Date Thu, 01 Mar 2012 18:00:06 GMT
Hi all,

I'm rethinking the layout of my data (currently served by cassandra
0.8.x thru pycassa 1.1, but reasonably I'm gonna use cassandra 1.x with
pycassa 1.4).

My current data contains a few columns storing timestamps: given that at
the time there was no native pycassa support I used an ISO 8601 string
representation for such values. Recently pycassa implemented native
datetime support which I'd like to take advantage of.

Given that I need to change this kind of details, I spent some time
trying to understand if sstable2json can be the right tool for the
migration before going to write my own: the idea is to export my current
data in JSON, hacking it as needed and then reimport it into a new 1.x

One of the first tweaks will be transforming my existing timestamps
format into their JSON equivalent and so I did a simple test, inserting
a few timestamps in a column family, and then trying to export it with
sstable2json, but what I got confused me; for example, given that with
pycassaShell I see a value like

 ('changed', datetime.datetime(2012, 3, 1, 11, 17, 5, 581306))

sstable2json (as of cassandra 1.0.8) exports it as 

 ["changed","44134-12-10 13:53:01+0100",1330597025582986]

What am I missing?

Thanks in advance for any hint,
ciao, lele.
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.  |                 -- Fortunato Depero, 1929.

View raw message