Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 6 Materials and Homework.

Registrations still open!


question

David Jones-Gilardi avatar image
David Jones-Gilardi asked ·

Timeseries data modeling question

This is a question per c00laf in Discord:

Hey Cassandra gurus, I need your advice on data modeling (please).
So, lets say I have a timeseries data that I plan on using for certain aws resource live check. Let's say, we have an ARN (or really any id) and we have an operation that we can perform - checkState(ARN). State of the resource can be up or down, and I want to keep track of it's state changes over time by querying the table. So, I wanna use C* table to store attributes like ARN(or ID), timestamp, status. Imagine my entries will look like (1, 07072020, up), (2, 07092020, up), (1, 01082020, down).
Help me model it to efficiently query by ID (to get everything related to the specific ID) AND get only those records which are in the "UP" state - in my example, ID 1 went down and shouldn't be included.
cassandradata modeling
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

0 Answers