Skip to content

Conversation

@ldelberg
Copy link
Contributor

It's possible to filter the transactionlog entries with a lambda expression: Tuple/any(t: t eq 'filter value')
The function get_transaction_log_entries accepts kwargs so we could add a section to the log_filter list in order to generate a lambda expression for the query:
get_transaction_log_entries(reverse=True, user='Admin', cube='plan_BudgetPlan', tuple={'105': 'eq', '405': 'eq', '41101': 'ge'})

tuple is a dict with 'filter value' as key and a operator as value.

This could be extended to a lambda all expression by defining a lambda_method parameter which defaults to "any" but can changed to "all".
What do you think?

@zsoltmoravcsik
Copy link

zsoltmoravcsik commented Nov 16, 2022 via email

@MariusWirtz
Copy link
Collaborator

Nice work @ldelberg! Thanks

I added a suggestion regarding naming and parametrization.

If you have time you can also add a test case here:

def test_get_last_transaction_log_entries(self):

Otherwise, I would write a test as part of a review next week or so.

@MariusWirtz
Copy link
Collaborator

@adscheevel adding you to this conversation since you wrote the previous version of this function.
I'm curious about your thoughts on the feature.

@ldelberg
Copy link
Contributor Author

@MariusWirtz I've added a test for this part of the function. Please check if it meets your expectations

@MariusWirtz MariusWirtz merged commit a77a228 into cubewise-code:master Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants