Seif Harrathi
11/29/2022, 9:38 AM@flow(name="Run Check", description="Flow that controls the data integrity")
def run_check(layers_data):
"""
1- Extract data from Arcgis databse
2- Transform data
3- Load result into Excel output
@param layers_data:
@return:
"""
# 1- Extract data from databse
state = extract_data(layers_data, return_state=True)
raw = state.result()
# 2- Transform data
state = DataTransformer.transform_results(raw, return_state=True)
data = state.result()
# 3- Load result into Excel output
state = DataWriter.load_results(data, return_state=True)
output = state.result()
return {"Result": {
"nb_errors": 12,
"nb_lines_checked": 456
},
"output_path": "path_to_s3"
}
My question is how to get the results returned by my flow run like I want to get
{
"Result": {
"nb_errors": 12,
"nb_lines_checked": 456
},
"output_path": "path_to_s3"
}
I used the Endpoint :/api/flow_runs/{id}
But I I dont the my result in the response 😕
Any help ? Any idea . I thought about saving the result in the S3 bucket than retrieve it but not sure if this is the best practice
Thaaaaaaaaaaaanks in advanceSerina
11/29/2022, 7:19 PMget the results
-- If you don’t need to pass the data somewhere else, but you’re just wanting to view the results in the UI you could use logging
https://docs.prefect.io/concepts/logs/?h=loggingSeif Harrathi
11/29/2022, 7:38 PMSerina
11/29/2022, 8:18 PMSeif Harrathi
11/30/2022, 8:20 AM