You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Srinivasa T N <se...@gmail.com> on 2015/01/23 09:44:40 UTC
How to store weather station Details along with monitoring data efficiently?
Hi All,
I was following the TimeSeries data modelling in PlanetCassandra by
Patrick McFadin. Regarding that, I had one query:
If I need to store the weather station name also, should it be in the same
table, say:
create table test (wea_id int, wea_name text, wea_add text, eventday
timeuuid, eventtime timeuuid, temp int, PRIMARY KEY ((wea_id, eventday),
eventtime) );
This forces me to enter the wea_name and wea_add for each new row, so how
to identify a new row has been created? Or is there any better mechanism
for modeling the above data?
Regards,
Seenu.
Re: How to store weather station Details along with monitoring data efficiently?
Posted by Srinivasa T N <se...@gmail.com>.
Let me try to pictorially what I understood:
[image: Inline image 1]
Is it correct?
Regards,
Seenu.
On Sat, Jan 24, 2015 at 2:37 AM, Jan <cn...@yahoo.com> wrote:
> The model you are using seems OK.
>
> Your question:
> This forces me to enter the wea_name and wea_add for each new row, so how
> to identify a new row has been created?
>
> Answer: You do 'not' need to add the wea_name or wea_address during
> inserts for every new row. Your insert could only include the Primary &
> clustered keys and it should be fine.
>
> You identify the new row via : Primary & clustered keys.
>
> Errata: You could add Longitude & Latitude too to the model to add a
> level of detail especially since its widely prevalent for weather station
> data.
>
> hope this helps.
>
> jan/
>
>
> On Friday, January 23, 2015 3:14 AM, Srinivasa T N <se...@gmail.com>
> wrote:
>
>
> I forgot, my task at hand is to generate a report of all the weather
> station's along with the sum of temperatures measured each day.
>
> Regards,
> Seenu.
>
> On Fri, Jan 23, 2015 at 2:14 PM, Srinivasa T N <se...@gmail.com> wrote:
>
> Hi All,
> I was following the TimeSeries data modelling in PlanetCassandra by
> Patrick McFadin. Regarding that, I had one query:
>
> If I need to store the weather station name also, should it be in the same
> table, say:
>
> create table test (wea_id int, wea_name text, wea_add text, eventday
> timeuuid, eventtime timeuuid, temp int, PRIMARY KEY ((wea_id, eventday),
> eventtime) );
>
> This forces me to enter the wea_name and wea_add for each new row, so how
> to identify a new row has been created? Or is there any better mechanism
> for modeling the above data?
>
> Regards,
> Seenu.
>
>
>
>
>
Re: How to store weather station Details along with monitoring data
efficiently?
Posted by Jan <cn...@yahoo.com>.
The model you are using seems OK.
Your question: This forces me to enter the wea_name and wea_add for each new row, so how to identify a new row has been created?
Answer: You do 'not' need to add the wea_name or wea_address during inserts for every new row. Your insert could only include the Primary & clustered keys and it should be fine.
You identify the new row via : Primary & clustered keys.
Errata: You could add Longitude & Latitude too to the model to add a level of detail especially since its widely prevalent for weather station data.
hope this helps.
jan/
On Friday, January 23, 2015 3:14 AM, Srinivasa T N <se...@gmail.com> wrote:
I forgot, my task at hand is to generate a report of all the weather station's along with the sum of temperatures measured each day.
Regards,
Seenu.
On Fri, Jan 23, 2015 at 2:14 PM, Srinivasa T N <se...@gmail.com> wrote:
Hi All,
I was following the TimeSeries data modelling in PlanetCassandra by Patrick McFadin. Regarding that, I had one query:
If I need to store the weather station name also, should it be in the same table, say:
create table test (wea_id int, wea_name text, wea_add text, eventday timeuuid, eventtime timeuuid, temp int, PRIMARY KEY ((wea_id, eventday), eventtime) );
This forces me to enter the wea_name and wea_add for each new row, so how to identify a new row has been created? Or is there any better mechanism for modeling the above data?
Regards,
Seenu.
Re: How to store weather station Details along with monitoring data efficiently?
Posted by Srinivasa T N <se...@gmail.com>.
I forgot, my task at hand is to generate a report of all the weather
station's along with the sum of temperatures measured each day.
Regards,
Seenu.
On Fri, Jan 23, 2015 at 2:14 PM, Srinivasa T N <se...@gmail.com> wrote:
> Hi All,
> I was following the TimeSeries data modelling in PlanetCassandra by
> Patrick McFadin. Regarding that, I had one query:
>
> If I need to store the weather station name also, should it be in the same
> table, say:
>
> create table test (wea_id int, wea_name text, wea_add text, eventday
> timeuuid, eventtime timeuuid, temp int, PRIMARY KEY ((wea_id, eventday),
> eventtime) );
>
> This forces me to enter the wea_name and wea_add for each new row, so how
> to identify a new row has been created? Or is there any better mechanism
> for modeling the above data?
>
> Regards,
> Seenu.
>