Filip Panovski
03/06/2023, 8:46 AMScript at 'data_exports/extract_data.py' encountered an exception: ModuleNotFoundError("No module named 'pandas'")
which kind of confuses me, since the host where I am creating the deployment is not where it will run. My questions boil down to:
1. Why does the CLI need to know pandas
(or any other library that I’m using)?
2. Does this mean that I should set up a different venv for every one of my deployments?Kelvin DeCosta
03/06/2023, 9:00 AMpandas
wherever you're running your scriptFilip Panovski
03/06/2023, 9:02 AMKelvin DeCosta
03/06/2023, 9:25 AMChristopher Boyd
03/06/2023, 2:19 PMdeployment = Deployment(
name=f"Import-{FLOW_ENVIRONMENT}",
flow_name="Import_flow",
version=1,
work_queue_name="dev",
infrastructure=k8s_job,
path="/opt/prefect/flows",
parameters=params,
entrypoint="flow.py:flow_import",
parameter_openapi_schema=schema
)
Filip Panovski
03/24/2023, 4:21 PMparameter_openapi_schema
, do you know of an example in this context that I might have a look at?Christopher Boyd
03/24/2023, 4:26 PMschema = {
'title': 'Parameters',
'type': 'object',
'properties': {
'callback_url': {
'type': 'string',
'title': 'callback_url'
},
'trigger_source': {
'type': 'string',
'title': 'trigger_source'
},
'external_id': {
'type': 'string',
'title': 'external_id'
},
'debug': {
'type': 'boolean',
'title': 'debug',
'default': 'False'
},
'gcp_logging_enabled': {
'type': 'boolean',
'title': 'gcp_logging_enabled',
'default': 'False'
},
"duration": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
1
],
"title": "duration"
},
}
}
Filip Panovski
03/24/2023, 4:40 PMtype
, title
, default
..) correspond
to the pydantic.Field
kwargs?pendulum.yesterday('Europe/Berlin').date()
, I wouldn't be able to pass those sensibly and would need to go the pydantic.Field
route, correct?Christopher Boyd
03/24/2023, 4:57 PMFilip Panovski
03/24/2023, 5:05 PM