Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WRITETIME access at cell level? #27

Open
cadupont opened this issue Apr 4, 2018 · 1 comment
Open

WRITETIME access at cell level? #27

cadupont opened this issue Apr 4, 2018 · 1 comment

Comments

@cadupont
Copy link

cadupont commented Apr 4, 2018

I've been trying to find a way to access WRITETIME from cassandra (field) into pyspark. Am I looking at the right place? I can't seem to find a way to do this...
Thanks

@sathiyarajanm
Copy link
Contributor

@cadupont can you try the dse-driver

pip install dse-driver

and try to get the writetime by using :
print session.execute("SELECT WRITETIME (date) FROM mykeyspace.temp WHERE date = '2017-12-01' ALLOW FILTERING;")

code snippet to test with cassandra:

Example:
from dse.cluster import Cluster
cluster = Cluster(contact_points=['localhost'])
session = cluster.connect('system')
print session.execute("SELECT WRITETIME (date) FROM mykeyspace.temp WHERE date = '2017-12-01' ALLOW FILTERING;")
Row(writetime_date=1530649026473825)

@anguenot : Any plan to add the writetime functionality in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants