SIENTIAPDE-1110
Enhance MongoDB data return format by converting to DataFrame dictionary, improving data structure for downstream processing.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
from pandas import DataFrame
|
||||||
from temporalio import workflow, activity
|
from temporalio import workflow, activity
|
||||||
|
|
||||||
with workflow.unsafe.imports_passed_through():
|
with workflow.unsafe.imports_passed_through():
|
||||||
@@ -119,7 +120,7 @@ class MongoDB(BaseActivity):
|
|||||||
metadata=metadata
|
metadata=metadata
|
||||||
)
|
)
|
||||||
|
|
||||||
return data
|
return DataFrame(data).to_dict()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
trace = traceback.format_exc()
|
trace = traceback.format_exc()
|
||||||
self.send_notification(
|
self.send_notification(
|
||||||
|
|||||||
Reference in New Issue
Block a user