Skip to content

Commit

Permalink
Added set_keyspace for easier query cassandra
Browse files Browse the repository at this point in the history
  • Loading branch information
syerushalmy committed Dec 20, 2016
1 parent a860c83 commit 0248371
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions redash/query_runner/cass.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def run_query(self, query, user):
connection = Cluster([self.configuration.get('host', '')])

session = connection.connect()
session.set_keyspace('{}'.format(self.configuration['keyspace']))
logger.debug("Cassandra running query: %s", query)
result = session.execute(query)

Expand Down

0 comments on commit 0248371

Please sign in to comment.