Skip to content

Commit

Permalink
feat: update cassandra connection settings signature (#180)
Browse files Browse the repository at this point in the history
* feat: update cassandra connections settings signature

* fix: remove Optional from type hint

* fix: set Consistencylevel to LOCAL_QUORAM while connecting to keyspaces
  • Loading branch information
shubhank-v authored Jun 15, 2022
1 parent d5c124a commit 54c3ed1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hip_data_tools/etl/athena_to_googleads.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import List, Tuple, Dict, Any
from attr import dataclass
from cassandra.cqlengine import ValidationError
from cassandra import ConsistencyLevel
from pandas import DataFrame

from hip_data_tools.apache.cassandra import (
Expand Down Expand Up @@ -212,7 +213,10 @@ def _state_manager_connect(self):

LOG.info("Connecting to Cassandra")

conn = CassandraConnectionManager(self.__settings.etl_state_manager_connection)
conn = CassandraConnectionManager(
self.__settings.etl_state_manager_connection,
consistency_level=ConsistencyLevel.LOCAL_QUORUM,
)
conn.setup_connection(self.__settings.etl_state_manager_keyspace)

LOG.info("Cassandra connection established")
Expand Down

0 comments on commit 54c3ed1

Please sign in to comment.