Date Modelling Query

34 views
Skip to first unread message

Guna Sekhar Dora

unread,
May 28, 2022, 11:03:08 PM5/28/22
to KairosDB

Hi all.

I have a time series requirement and trying to understand how kairos works. Here is my requirement. Customers transact on merchants and transactions move from an initial state to success or failure states, and I'm interested in queries like calculating the number of transactions (success, or attempts) by customers on a specific merchant or type of merchants in a specific timeframe and other attribute filters. On exploring Kairos docs, found the tags which are used to store attributes are immutable as they are part of primary key.

So, I need to model my metric into 3 metrics rather, initiated_transactions, success_transactions, failure_transactions, which leads to duplication of data as the same transaction moves from initial to success or failure states.

One more concern which I had was, the cardinality of tags, customers, merchants would be too high, or of the order of millions. Given, Kairos compares tags in memory after finding out the buckets to query on, what is the ideal way to model my tags? I'm open to Kairos alternatives as well, if it can be better solved with any other time series DB?



I have added the same query on StackOverflow here. SO Can you please help me in understanding this? 

Thanks and regards
Guna Sekhar Dora Kovvuru

Brian Hawkins

unread,
Jun 11, 2022, 12:01:26 AM6/11/22
to KairosDB
A lot of times with big data the solution is to write the data multiple times in different ways that allow you to query for specific answers.  So splitting the data into three metrics is a good approach.  
Kairos 1.3 has an index feature that lets you query high cardinality tags faster, given that you always specify the tag in the query.  Another possibility is to break the metric up even more and write one metric tagged by customer and other by merchant.  not sure that last bit will help, depends on the exact queries you are trying to do.

Hope that helps a bit.

Brian

Reply all
Reply to author
Forward
0 new messages