Skip to content

Instantly share code, notes, and snippets.

@MariusWirtz
Last active June 2, 2023 08:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MariusWirtz/1dd07a269304fc53aef39ea8d1169585 to your computer and use it in GitHub Desktop.
Save MariusWirtz/1dd07a269304fc53aef39ea8d1169585 to your computer and use it in GitHub Desktop.
Filter transactionlog
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