How do I check if the execution of the stored procedure is successful. In the code below, I want to execute my_prc 50 times, and for each run (successful/unsuccessful) I want to update some table with the status run.
WHILE i < 50 DO
call `my_project.my_dataset.my_prc`(project_name,data_set_name,table_name,v_date,v_sql,v_error);
If above proc is still executing
wait ;
else If above proc finished successfully
then
update some_table with status=Success;
set i = i + 1;
end
END LOOP
Note: In my_prc I have dynamic DML SQL so even if I know the status of that SQL then I can return that status via OUT parameter. So my question is how do I check the status of SQL run in BigQuery.
question from:
https://stackoverflow.com/questions/65903147/bigquey-execution-status-of-stored-procedure 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…