Question: I am working on a Big Data solution for sensor data and predictive analytics.
I am new to Big Data, and have read about the lambda-architecture.
I thought about using Cassandra Database together with Hadoop.
Cassandra is a high available and Partition tolerance database and Hadoop hdfs a file system for large analytics jobs.

If I receive the data from a Internet of Things Device, should the data be saved first in Hadoop and then to Cassandra?
The lambda architecture has Hadoop in batch layer, receiving the data and sending it to the serving layer to a nosql database.

Why should the data be first in Hadoop? 
and what kind of data is stored in Cassandra if Hadoop contains the raw data?

The stream layer is out of Focus at the moment.
I just want to understand the usage of Cassandra and Hadoop together. 

The data in Hadoop is for large analytics and in cassandra there should be the result from my Hadoop jobs.

Does that mean i can store my raw data in both? i can store my raw data in Cassandra and in Hadoop if not only the large analytics jobs are useful for my application? 

Example

```
INSERT INTO temperature(weatherstation_id,event_time,temperature)
VALUES (’1234ABCD’,’2013-04-03 07:02:00′,’73F’);

```

if this is my insert and i have thousands of them in one single minute.
I want to do some large jobs i use Hadoop ?

But also i need every single Data Row for my application without analytics. Cassandra is storing it too?

Answer: 
`"playerStatSummaries"` holds `list` value and not `dict`. Hence your `for` loop should be like:

```
#         v  This will be `dict` object
for player_stat_summary in stats['playerStatSummaries']:
    if player_stat_summary['playerStatSummaryType'] == "Unranked":
        # Do Something

        # player_stat_summary['aggregatedStats']['totalChampionKills']
        # For accessing the value you require

```
"playerStatSummaries" This is a list of internal objects, why do you not read directly as a list of elements?

```
In [9]: a[1]
Out[9]: 
{'aggregatedStats': {'totalAssists': 336,
  'totalChampionKills': 394,
  'totalMinionKills': 2741,
  'totalNeutralMinionsKilled': 146,
  'totalTurretsKilled': 57},
 'modifyDate': 1453305771000,
 'playerStatSummaryType': 'CoopVsAI',
 'wins': 34}

```

If you need a deeper level is the same operation 

```
In [12]: a[1]['aggregatedStats']['totalChampionKills']
Out[12]: 394

```