-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Issue Summary
Keen provides an include_metadata=true query parameter to return execution metadata for ad-hoc queries (docs) which is not currently supported.
This would be useful to have as an optional kwarg for the ad-hoc query methods on KeenClient.
Example API's
Return a dictionary with result and execution_metadata keys:
>>> keen.count("purchases", timeframe="this_14_days", include_metadata=True)
{
"result": 100,
"execution_metadata": {
"total_processing_time": 0.09057211875915527,
"events_scanned": 1000,
"properties_per_event": 4,
"total_properties_scanned": 4000,
},
}Return a (result, execution_metadata) tuple:
>>> keen.count("purchases", timeframe="this_14_days", include_metadata=True)
(
100,
{
"total_processing_time": 0.09057211875915527,
"events_scanned": 1000,
"properties_per_event": 4,
"total_properties_scanned": 4000,
},
)Very happy to implement and PR for it after discussion on whether to support the feature and on the desired API 👍
Metadata
Metadata
Assignees
Labels
No labels