Questions tagged [timeuuid]

Use it to mark specific Cassandra questions that are involving a TimeUUID instead of a generic UUID.

TimeUUID is a random global unique identifier (UUID) of 16 bytes.

Sample hex presentation: a4a70900-24e1-11df-8924-001ff3591711

See http://en.wikipedia.org/wiki/Universally_Unique_Identifier

A TimeUUID is a basic Cassandra data type. An important property is that TimeUUIDs can be ordered by time.

50 questions
2
votes
2 answers

Cassandra limit clause for timestamp(timeuuid)

I have a cassandra table structure as follows create table demo (user_id text , comment_id text , timestamp timeuuid , PRIMARY KEY (user_id , comment_id , timestamp)) Now in the UI I want pagination such that on the click of next button , I should…
2
votes
1 answer

Cassandra TimeUUID in DynamoDB

I am migrating an application from Cassandra to DynamoDB. On Cassandra we used as key a combination of (entityName,TimeUUID), with DynamoDB as far as I have read I could use a Hash+Range Primary Key. To mantain the same data structure of the…
alessiop86
  • 1,285
  • 2
  • 19
  • 38
2
votes
1 answer

Cassandra update and sort on same column

I'm looking for some inputs around cassandra data modelling for a timeline kind of feature. To store data for the timeline, I'm planning to use timeuuid in cassandra and make it as a clustering key. This will help in sorting the data. But the same…
tech0123
  • 73
  • 4
2
votes
1 answer

How do I insert a new timeuuid and retrieve the inserted value?

I'm inserting some data into a Cassandra table(/column family), and I need to generate a unique key. I've decided to use timeuuid for this, as it gives me nice sortability as well as uniqueness. I can use the now() function to generate the timeuuid,…
Mark
  • 11,257
  • 11
  • 61
  • 97
2
votes
1 answer

Updating TimeUUID columns in cassandra

I'm trying to store some time series data on the following column family: create column family t_data with comparator=TimeUUIDType and default_validation_class=UTF8Type and key_validation_class=UTF8Type; I'm successfully inserting data this…
jcazor
  • 123
  • 1
  • 7
1
vote
0 answers

How to cast timeUUID to timestamp in PySpark/Python?

I have a column named "occurance" which is a timeuuid in the string form. I want to to be converted/cast to timestamp. I tried couple of methods but couldn't get through it. from uuid import * import time_uuid my_uuid = uuid.UUID(occurrence) ts =…
Rahul Diggi
  • 288
  • 2
  • 16
1
vote
1 answer

How to generate a version1 uuid in Cockroachdb

Our current datastore is Cassandra. We're planning to move away from it towards Cockroachdb wherein we need to refactor our code(Spring boot). The current scripts use the datatype 'timeuuid' which gives a version1 uuid in Cassandra. Now, I need a…
T Anna
  • 874
  • 5
  • 21
  • 52
1
vote
1 answer

Is it possible to get the original UUID1 from a timestamp?

Say, for example, I generate a time based UUID with the following program. import uuid uuid = uuid.uuid1() print uuid print uuid.time I get the following: 47702997-155d-11ea-92d3-6030d48747ec 137946228962896279 Can I get back the original UUID,…
Haunted
  • 345
  • 1
  • 2
  • 11
1
vote
1 answer

get timebased uuid's upto 100s of nanoseconds

I am using this libraryDependencies += "com.datastax.oss" % "java-driver-core" % "4.3.0" library for creating time based uuid's. Although it generates time based uuid's it gives me upto seconds but i am looking for values in 100s of nano…
Mahesh
  • 129
  • 1
  • 2
  • 19
1
vote
1 answer

How to update timeuuid column in cassandra

How can I update a timeuuid column in Cassandra? I tried the following query cqlsh:mydb> UPDATE mytable SET mycolumn = '99b47d70-b465-11e9-8080-808080808080' WHERE mycolumn= '99a53b30-b465-11e9-8080-808080808080'; and it failed with…
Joyce Babu
  • 19,602
  • 13
  • 62
  • 97
1
vote
1 answer

Cassandra timeuuid column to nanoseconds precision

Cassandra table has timeuuid data type column so how do I see the value of type timeuuid in nanoseconds? timeuuid: 49cbda60-961b-11e8-9854-134d5b3f9cf8 49cbda60-961b-11e8-9854-134d5b3f9cf9 How to convert this timeuuid to nanoseconds need a select…
1
vote
1 answer

PHP Cassandra Timeuuid constructor hits Integer Limit (32bit)

I am using cassandra timeuuid in my project. But unable to create timeuuid due to integer limits. $time = time(); $tS = new Cassandra\Timeuuid($time); echo("Time Stamp : " . $time . "
"); echo("Time UUID : " . $tS .…
Ligo George
  • 819
  • 2
  • 9
  • 21
1
vote
1 answer

Cassandra select by timeuuid

Spring-boot-data-cassandra CQL: CREATE TABLE device_data ( device_id uuid, time timeuuid, unit text, value double, PRIMARY KEY (device_id, time) ) Repository: public interface DeviceDataRepository extends…
Alex Tbk
  • 2,042
  • 2
  • 20
  • 38
1
vote
1 answer

Cassandra: Does timeuuid preserve order?

I was using timestamp as primary key for my data by calling toTimestamp(now()), but unfortunately this creates collision. I understand that timeuuid guarantees uniqueness, but if I do ORDER BY timeuuid, does timeuuid also guarantee the original…
tpoker
  • 492
  • 1
  • 5
  • 15
1
vote
2 answers

How to generate unique id

How can we generate unique id's between two JVMs running at the same time? I think UUID uuid = UUID.randomUUID(); or UID uid = new UID(); is not enough.
Lilit Mkrtchyan
  • 135
  • 1
  • 2
  • 11