This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import os | |
| from datetime import datetime | |
| class Logger: | |
| _instance = None | |
| def __new__(cls, log_prefix='projectname', level=logging.INFO, log_folder='logs'): | |
| if cls._instance is None: | |
| cls._instance = super(Logger, cls).__new__(cls) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Cassandra Data Import Tool - Offline CQL Generator | |
| - Reads local CSV dumps for source and target tables | |
| - Finds rows present in source but missing in target | |
| - Writes a CQL script with INSERT statements (optionally IF NOT EXISTS) | |
| - No direct Cassandra connection required | |
| Run: | |
| python3 generate_missing_inserts.py |
OlderNewer