https://prefect.io logo
Title
j

Jarrod Clark

07/08/2022, 3:04 PM
Greetings. I am a bit of a Prefect noob, and I am having what seems on the surface to be a simple problem but I just can't figure it out. I have a flow that makes a SQL query, creates a pandas dataframe then uploads to an Elasticsearch index. When I use flow.run() in Jupyterlab it will run as expected, it registers with no errors but when I run it from the dashboard I receive the following error: 'FileNotFoundError: [Errno 2] No such file or directory: 'all_cases.sql' Anyone have any suggestions?
k

Kevin Kho

07/08/2022, 3:08 PM
You can just start the agent in the same directory that has access to that sql file
j

Jarrod Clark

07/08/2022, 3:17 PM
TY! I knew I was doing something dunderheaded. Problem solved.
k

Kevin Kho

07/08/2022, 3:23 PM
Or you can specify the working directory here
j

Jarrod Clark

07/08/2022, 3:28 PM
Thanks again