Andrea Nerla
01/28/2022, 3:19 PMAnna Geller
Andrea Nerla
01/28/2022, 3:32 PM@task
def extract_load():
os.system(r'"python C:\Users\andrea.nerla\Desktop\sidal\python_per_test\test_systemuser.py"')
Amanda Wee
01/28/2022, 3:40 PMos.system
runs the Python interpreter to run the specified Python script, and the exception is raised in that script, which doesn't then propagate to this Prefect task since it is an external script.
You might need to say, check for a non-zero return value for os.system
then raise an exception within the Prefect task, e.g., Prefect's FAIL
signal.Anna Geller
Andrea Nerla
01/28/2022, 3:52 PM