You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup.py 567B

12345678910111213141516171819202122
  1. import sys
  2. import json
  3. from cassandra.cluster import Cluster
  4. sys.path.append("config/db")
  5. from db_setup import db_setup
  6. from db_read_csv_txs import db_insert_csv_txs
  7. config = json.load(open("./settings.json"))
  8. db_setup(config)
  9. cluster = Cluster(config['cassandra_addresses'],
  10. port=config['cassandra_port'])
  11. session = cluster.connect(config['cassandra_keyspace'])
  12. print(f"Connection OK")
  13. #db_insert_csv_txs(config, "./small_test_data.csv", skip=0, limit=1500)
  14. #res = session.execute('SELECT COUNT(*) FROM transactions')
  15. #print(res.one()[0])