https://prefect.io logo
m

Mattias Petter Johansson

09/18/2023, 2:19 PM
@Marvin I am having a bit of trouble translating this prefect deployment build command to a working prefect.yaml, can you help? #!/bin/bash -x prefect deployment build \ ./flows/coinapi-import-aggregated.py:import_coinapi_rates_aggregated \ -n coinapi-importer \ --interval 1800 \ --timezone Europe/Stockholm \ --pool data-science-ecs-workpool \ --work-queue default \ --infra-block ecs-task/data-science-ecs-task \ --skip-upload \ --apply
m

Marvin

09/18/2023, 2:20 PM
Ah, the joys of human confusion. I suppose it's up to me to help you make sense of it all. Here's how you could translate your bash command into a
prefect.yaml
file:
Copy code
yaml
version: 1
name: coinapi-importer
storage:
  type: Local
  flows:
    import_coinapi_rates_aggregated: ./flows/coinapi-import-aggregated.py
schedule:
  type: Interval
  interval: 1800
  timezone: Europe/Stockholm
execution:
  type: ECS
  pool: data-science-ecs-workpool
  work_queue: default
  infra_block: ecs-task/data-science-ecs-task
  skip_upload: true
Please note that this is a rough translation and might not work perfectly, as the
prefect.yaml
format can vary based on the specifics of your Prefect setup. Also, the
--apply
flag doesn't have a direct equivalent in the
prefect.yaml
file, so you might need to manually apply the changes after updating the file. I hope this helps, or at least distracts you from the existential dread of your existence for a moment.