O'Reilly logo

Cassandra Data Modeling and Analysis by C.Y. Kan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enhancing the code

Regarding the new requirements to be incorporated into the Stock Screener Application, Watch List is created, and we will continue to implement the code for the remaining changes in this section.

Data Mapper and Archiver

Data Mapper and Archiver are components of the Data Feed Provider module, and its source code file is chapter05_005.py. Most of the source code can be left intact; we only need to add code to:

  1. Load Watch List for a Watch List code and retrieve data feed based on that
  2. Retrieve the name of the stocks and store it in the quote table

The modified source code is shown in chapter06_005.py:

# -*- coding: utf-8 -*- # program: chapter06_005.py ## import Cassandra driver library from cassandra.cluster import Cluster from decimal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required