Thy Bui
06/24/2024, 8:26 PMNate
06/24/2024, 8:29 PMfrom_source
or prefect.yaml
section where you provide credentials for your private repo?
i.e. how are you providing those credentials?Thy Bui
06/24/2024, 8:45 PMNate
06/24/2024, 8:55 PMThy Bui
06/24/2024, 9:00 PMNate
06/24/2024, 9:04 PMprefect worker start --pool my-pool
) instead of prefect agent start
(latter is deprecated)
from_source
relies on the worker's ability to pull
flow code (not using a storage block like agents used to)Nate
06/24/2024, 9:04 PMNate
06/24/2024, 9:05 PMThy Bui
06/24/2024, 9:07 PMNate
06/24/2024, 9:10 PMThy Bui
06/24/2024, 10:15 PMNate
06/24/2024, 10:20 PMThy Bui
06/24/2024, 10:27 PMNate
06/24/2024, 10:31 PMflow.from_source().deploy()
in it and then you should be ready to schedule runs from the UI or API. a worker that we run will pick up and execute your scheduled runThy Bui
06/24/2024, 10:38 PMNate
06/24/2024, 10:40 PMNate
06/24/2024, 10:41 PMpyodbc
create some file called libodbc.so.2
?Thy Bui
06/24/2024, 10:41 PMThy Bui
06/24/2024, 10:42 PMThy Bui
06/25/2024, 12:02 AMThy Bui
06/25/2024, 10:19 PMNate
06/25/2024, 10:27 PMimport os
import subprocess
def install_odbc_drivers():
if os.name == 'posix':
# Assuming a Debian-based system for simplicity
subprocess.check_call(['apt-get', 'update'])
subprocess.check_call(['apt-get', 'install', '-y', 'unixodbc', 'unixodbc-dev'])
else:
raise EnvironmentError("Unsupported OS")
install_odbc_drivers()
to install the drivers you apparently need in your flow on the runtime machineThy Bui
07/09/2024, 7:50 PM