Spark application uses a dataset in the code that refers to the data, with spark streaming the database table just keeps on growing as data comes in

You’d perform your operation in the scope/windows of time.

Spark streaming and Kinesis