Questions tagged [prefect]

Prefect is a Python-based workflow management system (ETLs are an example use-case). Users organize Tasks into Flows, define dependencies, schedules, etc., and Prefect takes care of the rest.

Prefect

Prefect is an open-source workflow and orchestration framework, written in Python 3, that bills itself as an up-and-coming alternative to Airflow. Its design philosophy emphasizes the benefits of negative engineering: that is, features designed to manage the failure and recoverability of workflows as a natural extension of normal development. Its creators also tout the benefits of its hybrid execution model, whereby orchestration occurs with zero knowledge of either the code being run or the data being manipulated. It also boats features such as first-class workflow scheduling, dynamic task generation, and horizontal workflow scalability via out-of-the-box integration with Dask Distributed.

Prefect consists of three components:

  • Prefect Core: the central features of development in the Prefect ecosystem, by which Tasks are composed into directed acyclic graphs (DAGs) called Flows.
  • Prefect Server: the GraphQL application and UI that, taken together, allow users to manage flow submission and execution in an easy-to-use and interactive manner.
  • Prefect Cloud: the optional commercial offering of the Prefect maintainers, which organizations can use to leverage managed infrastructure in addition to the benefits of Prefect Server.

More information about Prefect is available at:

179 questions
0
votes
1 answer

Do not rerun previous tasks in Prefect

How can I tell Prefect, to not rerun all previous tasks in DAG?
v.sheg
  • 53
  • 4
0
votes
1 answer

using iterator in prefect task "batching"

I am using prefect and defining a flow to insert documents with cosmos db. The problem is the query_items() call is an iterable, and for large containers, there would be no way to hold all entries in memory. I believe my problem could be reduced…
Nathan McCoy
  • 3,092
  • 1
  • 24
  • 46
0
votes
1 answer

How does one use prefect cloud secrets with coiled?

I am trying to run a flow using a secret stored in prefect cloud with coiled. The flow errors out with a prefect client error: prefect.utilities.exceptions.ClientError: Malformed response received from Cloud - please ensure that you have an API…
Itay Livni
  • 2,143
  • 24
  • 38
0
votes
1 answer

Prefect Multiple Database Connections

How does Prefect handle multiple database connections for flows or how does it delegate drivers and runtimes for connections to say; Oracle, SQL Server, and Snowflake? If I have a single Prefect server on Kubernetes, does Docker handle all of this,…
ratchet
  • 195
  • 4
  • 15
0
votes
1 answer

os.listdir vs grep in a Prefect schedule

I'm scheduling tasks with Prefect this way : #Python script from prefect import task, Flow from prefect.tasks.shell import ShellTask from datetime import timedelta from datetime import datetime from prefect.schedules import IntervalSchedule import…
Pauline
  • 1
  • 1
0
votes
1 answer

Access Google credentials secret from a DockerRun in Prefect

I have started working with prefect and I am trying to save my results to Google cloud Storage: import prefect from prefect.engine.results import GCSResult from prefect.run_configs import DockerRun, LocalRun from prefect.storage import Docker,…
LoicM
  • 1,786
  • 16
  • 37
0
votes
0 answers

How to run sql command using prefect task

I am trying to fetch data from teradata then writing and reading to parquet file using prefect tasks My code is working when I am executing sql separately like below def fetch_data(host,db_name,user,password,query): 'logic' @task(name="Write…
Reetesh Nigam
  • 133
  • 2
  • 2
  • 15
0
votes
1 answer

Prefect: How to imperatively create tasks based on a task list derived from a Parameter

I'm trying to define tasks imperatively based on a list. The challenge is that the list should be based on a Prefect parameter. Below is the code I tried, but apparently it doesn't work as task_dependency_pairs is a task, not a list. How do I make…
Jason O.
  • 3,168
  • 6
  • 33
  • 72
0
votes
1 answer

Can you stop or increase the time interval for the Lazarus process of Prefect?

Prefect has this Lazarus process which is "responsible for rescheduling any submitted or running flow". This issues is that if you have a retry delay over 10 min, your flow is killed by the Lazarus process. Does anyone know if it’s possible to…
Newskooler
  • 3,973
  • 7
  • 46
  • 84
-1
votes
0 answers

Is Prefect's VertexRun a GCP or AWS solution?

In the definition of vertex run the example definition was for Google's "e2-standard-4" which is a google cloud machine type. But it says there the the spec should be workerPoolSpec linking to the AWS documentation. (And so are the links to…
yuvalm2
  • 866
  • 2
  • 10
  • 27
-1
votes
1 answer

Prefect role deployment

Currently I'm working with Prefect and learning about it. I saw in the documentation that it's possible to assign and create different roles within Prefect Cloud for the necesarry access control. Now I want to know if it's possible to assign and…
larsje99
  • 1
  • 1
-1
votes
2 answers

TypeError: 'fn' must be callable (Prefect - Python)

I'm starting to leart some prefect + python and I'm facing a strange error at the very beginning with a very easy script: I have already tried it in two diferents PC.
-1
votes
1 answer

Prefect Python program runs before scheduled time

My program always runs on startup instead of the scheduled time, maybe i'm just misunderstanding something but I can't say why it's doing this. from prefect import flow, task, get_run_logger from prefect.deployments import Deployment from…
-2
votes
1 answer

Vegan dinosaur runs prefect jobs

I'm using python's prefect library (2.7.9) for managing complex cron-task flows. My library log: It is wierd, but: Why does vegan dinosaur run my prefect tasks? Are there any fundamental principles on using prehistoric animals for task…
kupihleba
  • 418
  • 5
  • 11
1 2 3
11
12