Last active
June 2, 2023 08:34
-
-
Save MariusWirtz/1dd07a269304fc53aef39ea8d1169585 to your computer and use it in GitHub Desktop.
Filter transactionlog
This file contains 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
from datetime import datetime | |
from TM1py import TM1Service | |
with TM1Service(address="localhost", port=12354, ssl=True, user="admin", password="apple") as tm1: | |
entries = tm1.server.get_transaction_log_entries( | |
user="Admin", | |
cube="Sales", | |
since=datetime(year=2020, month=7, day=29, hour=0, minute=0, second=0), | |
until=datetime(year=2020, month=7, day=30, hour=0, minute=0, second=0)) | |
for entry in entries: | |
# find changes for california ('CA') | |
if entry["Tuple"][5] == 'CA': | |
print(f"NewValue: '{entry['NewValue']}' at coordinates: '{entry['Tuple']}'") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment