Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 30AA110B15 for ; Fri, 28 Feb 2014 20:27:31 +0000 (UTC) Received: (qmail 56662 invoked by uid 500); 28 Feb 2014 20:27:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 56616 invoked by uid 500); 28 Feb 2014 20:27:22 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 56606 invoked by uid 99); 28 Feb 2014 20:27:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 20:27:22 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of winnerdood@gmail.com designates 209.85.213.178 as permitted sender) Received: from [209.85.213.178] (HELO mail-ig0-f178.google.com) (209.85.213.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 20:27:18 +0000 Received: by mail-ig0-f178.google.com with SMTP id y6so2552686igj.5 for ; Fri, 28 Feb 2014 12:26:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PtyFCxFyLZY+YrFdOwG8puXE2cHbgDpOJ4oWPtIaupU=; b=BoIpVFete/L0lyHG3pgNgL2Gdjf0EiBbs/8aSbLELNAcnE/V4nHVDEk34lzH+4A8d0 34uquBmwaFUk32Cnf2Cg+rSdUQGn+EN/z/R7HoOMUIl4XFjwMxdqx0LqChHdN7kQi61J 2o5as8yFBeRHP6+BlMn1VTSrjuP9erQo/bx7jJ9XkGZyV3VISqEnZZggNfiteMai7z7r Wu0wdF9JmkpCEIaIgkqXbctU6Z0P+yMws0SmOynBIETtKFoyH/bbq7igHO8lPPOrS4qM QHdqJhdm2V79nB9kjdmAzMgzsCtW25zL2i6Nn1tjsnGtXtlPqWmiRm5vedoGnN/dJ9UT q/Ag== MIME-Version: 1.0 X-Received: by 10.50.124.193 with SMTP id mk1mr6261798igb.17.1393619217579; Fri, 28 Feb 2014 12:26:57 -0800 (PST) Received: by 10.43.16.1 with HTTP; Fri, 28 Feb 2014 12:26:57 -0800 (PST) In-Reply-To: References: <1393615694797.82fa5327@Nodemailer> Date: Fri, 28 Feb 2014 15:26:57 -0500 Message-ID: Subject: Re: From: Kumar Ranjan To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=001a1135e8006a854c04f37d4269 X-Virus-Checked: Checked by ClamAV on apache.org --001a1135e8006a854c04f37d4269 Content-Type: text/plain; charset=ISO-8859-1 Thanks Tyler. Yes, I scanned through pycassaShell code couple of times but did not find anything like that. On Fri, Feb 28, 2014 at 3:24 PM, Tyler Hobbs wrote: > No, pycassa won't do anything fancy with timestamps automatically, you'll > have to keep doing yourself. > > > On Fri, Feb 28, 2014 at 1:28 PM, Kumar Ranjan wrote: > >> Yes, filter out based on time range. Currently i do this in python . Just >> curious to see if this can be done using pycassa somehow? >> -- >> Sent from Mailbox for iPhone >> >> >> On Fri, Feb 28, 2014 at 2:13 PM, Tyler Hobbs wrote: >> >>> Can you clarify exactly what you need help with? It seems like you >>> already know how to fetch the timestamps. Are you just looking for python >>> code to filter data that's not in a time range? >>> >>> By the way, there's a pycassa-specific mailing list here: >>> https://groups.google.com/forum/#!forum/pycassa-discuss >>> >>> >>> On Thu, Feb 27, 2014 at 2:48 PM, Kumar Ranjan wrote: >>> >>>> Hey folks, >>>> >>>> I am dealing with a legacy CFs where super_column has been used and >>>> python client pycassa is being used. An example is given below. My question >>>> here is, can I make use of include_timestamp to select data between two >>>> returned timestamps e.g between 1393516744591751 and 1393516772131811. This >>>> is not exactly timeseries but just selected between two. Please help on >>>> this? >>>> >>>> >>>> Data is inserted like this >>>> >>>> TEST_CF.insert('test_r_key',{'1234': {'key_name_1': 'taf_test_1'}}) >>>> >>>> >>>> Data Fetch: >>>> >>>> TEST_CF.get('test_r_key', include_timestamp=True) >>>> >>>> >>>> OrderedDict([('1234', OrderedDict([('key_name_1', (u'taf_test_1', >>>> 1393451990902345))])), >>>> >>>> ('1235', OrderedDict([('key_name_2', (u'taf_test_2', >>>> 1393516744591751))])), >>>> >>>> ('1236', OrderedDict([('key_name_3', (u'taf_test_3', >>>> 1393516772131782))])) >>>> >>>> ('1237', OrderedDict([('key_name_4', (u'taf_test_4', >>>> 1393516772131799))])) >>>> >>>> ('1238', OrderedDict([('key_name_5', (u'taf_test_5', >>>> 1393516772131811))])) >>>> >>>> ('1239', OrderedDict([('key_name_6', (u'taf_test_6', >>>> 1393516772131854))])) >>>> >>>> ('1240', OrderedDict([('key_name_7', (u'taf_test_7', >>>> 1393516772131899))])) >>>> >>>> ]) >>>> >>> >>> >>> >>> -- >>> Tyler Hobbs >>> DataStax >>> >> >> > > > -- > Tyler Hobbs > DataStax > --001a1135e8006a854c04f37d4269 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Tyler. Yes, I scanned through pycassaShell code cou= ple of times but did not find anything like that.


On Fri, Feb 28, 2014 at 3:24 PM, = Tyler Hobbs <tyler@datastax.com> wrote:
No, pycassa won't do an= ything fancy with timestamps automatically, you'll have to keep doing y= ourself.


On Fri, Feb 28, 2014 at 1:28 PM, Kumar Ranjan <winnerd= ood@gmail.com> wrote:
Yes, filter out based on time range. Currently i do this in python . = Just curious to see if this can be done using pycassa somehow?
&= mdash;
Sent from Mailbox for iPhone


On Fri, Feb 28, 2014 at 2:13 PM, Tyle= r Hobbs <tyler@datastax.com> wrote:

Can you clarify exactly what you need help with?  It = seems like you already know how to fetch the timestamps.  Are you just= looking for python code to filter data that's not in a time range?
=
By the way, there's a pycassa-specific mailing list here: https://groups.google.com/forum/#!forum/pycassa-discuss


On Thu, Feb 27, 2014 at 2:48 PM, Kumar R= anjan <winnerdood@gmail.com> wrote:

Hey folks,

I am dealing with a legacy CFs where super_column has been used and pyth= on client pycassa is being used. An example is given below. My question her= e is, can I make use of  include_timestamp to select data between two = returned timestamps e.g between 1393516744591751 and 1393516772131811. This= is not exactly timeseries but just selected between two. Please help on th= is?


Data is inserted like this

TEST_CF.insert('test_r_key',{'1234': {'key_name_1= 9;: 'taf_test_1'}})


Data Fetch:

TEST_CF.get('test_r_key', include_timestamp=3DTrue)


OrderedDict([('1234', OrderedDict([('key_name_1', (u'= ;taf_test_1', 1393451990902345))])),

             ('1235', Ordered= Dict([('key_name_2', (u'taf_test_2', 1393516744591751))])),=

             ('1236', Ordered= Dict([('key_name_3', (u'taf_test_3', 1393516772131782))]))<= /p>

             ('1237', Ordered= Dict([('key_name_4', (u'taf_test_4', 1393516772131799))]))<= /p>

             ('1238', Ordered= Dict([('key_name_5', (u'taf_test_5', 1393516772131811))]))<= /p>

             ('1239', Ordered= Dict([('key_name_6', (u'taf_test_6', 1393516772131854))]))<= /p>

             ('1240', Ordered= Dict([('key_name_7', (u'taf_test_7', 1393516772131899))]))<= /p>

            ])




--
Tyler Hobbs<= /span>
DataStax




--
Tyler Hobbs
DataStax

--001a1135e8006a854c04f37d4269--