• Ryan Brennan

    Ryan Brennan

    7 months ago
    Hi everyone - I’m curious to hear how teams are organizing their
    Projects
    . Right now we just have one big project for all of our flows. Is there any benefit to breaking them out further? Is it possible to do things like “run all flows in project X” or are projects only for organizational aesthetics?
    Ryan Brennan
    Kevin Kho
    +1
    3 replies
    Copy to Clipboard
  • Ken Nguyen

    Ken Nguyen

    7 months ago
    Hi everyone, This may seem a bit strange but I’m planning to use a Google Sheet as a front end where users can type in inputs. Then, users can click the submit button to trigger a Prefect flow that will read the Gsheet’s inputs, transform it, then write it back onto the Gsheet. I’m wondering if anyone has tried something similar and can offer feedback on my approach:1. We have a button in Gsheets that will activate a Google Apps Script to do an API call 2. The API call (hosted on AWS API Gateway) will trigger a Lambda function, which will trigger a Prefect flow 3. Prefect flow will read data in Gsheets, transform the data, then write data in Gsheets Any suggestions or input is appreciated!
    Ken Nguyen
    Anna Geller
    6 replies
    Copy to Clipboard
  • Heeje Cho

    Heeje Cho

    7 months ago
    Does task decorator currently support python generators? Trying to see if tasks play nice with yield.
    @task
    def generator(limit: int):
        logger = prefect.context.get("logger")
        for i in range(limit):
            <http://logger.info|logger.info>(i)
            yield i*i
    Heeje Cho
    Kevin Kho
    5 replies
    Copy to Clipboard
  • n

    Nick Hart

    7 months ago
    Hi, I’m trying to create a conditional Flow of Flows that runs a flow and then based on that flow’s final state either runs
    flow_if_success
    or
    flow_if_failure
    . Basically, I want to know how I can take the final state signal from
    conditional-flow
    and decide whether I want to run
    flow_if_success
    or
    flow_if_failure
    . I was having trouble matching the task signal with a value so that the case works properly. I was hoping you would be able to help me out. Would I need to use the
    get_task_run_result
    or is there a better way I can just grab the task result? Here is a snippet of my current test code:
    var1 = Parameter("var1", default = 4)
    var2 = Parameter("var2", default = 12)
    
    conditional_id = StartFlowRun(flow_name="Conditional-Flow", project_name="Test", wait=True)
    flow_if_success_id = StartFlowRun(flow_name="Flow_if_success", project_name="Test", wait=True)
    flow_if_failure_id = StartFlowRun(flow_name="Flow_if_failure", project_name="Test", wait=True)
    
    
    # Idea: Conditional flow runs first. If it succeeds with Success signal, run flow_if_success, if it fails with failure signal, run flow_if_failure
    with Flow("Conditional FoF") as parent_flow:
        conditional_run = conditional_id()
    
        with case (conditional_run, Success): #Conditional_run never matches Success even if successful task run
            flow_if_success_run = flow_if_success_id(parameters=dict(num=var1))
        with case (conditional_run, Failed): 
            flow_if_failure_run = flow_if_failure_id(parameters=dict(number=var2))
    n
    Anna Geller
    13 replies
    Copy to Clipboard
  • Andrea Haessly

    Andrea Haessly

    7 months ago
    I'm still trying to understand when I can set task attributes during the task constructor (vs when a copy of the task is made and the values are not carried over). Will post code example in 🧵
    Andrea Haessly
    Kevin Kho
    10 replies
    Copy to Clipboard
  • Brian Phillips

    Brian Phillips

    7 months ago
    Is anyone aware of any CI vendors that follow a similar execution model to Prefect? i.e. one where the source code is never on servers owned by the vendor?
    Brian Phillips
    Tyler Wanner
    2 replies
    Copy to Clipboard
  • Tim Enders

    Tim Enders

    7 months ago
    Getting this error on Prefect Cloud, but not locally.
    Clients have non-trivial state that is local and unpickleable.
    The load still seems to run OK, but it is marked as failure. How can I get rid of this error?
    Tim Enders
    Kevin Kho
    2 replies
    Copy to Clipboard
  • David Yang

    David Yang

    7 months ago
    Hi All, How to run local or docker agent processes backend on a windows system? similar to Supervisor.
    David Yang
    Kevin Kho
    +1
    8 replies
    Copy to Clipboard
  • Vamsi Reddy

    Vamsi Reddy

    7 months ago
    Hi all, is it possible to know the status of a flow with a particular run_name ? I want to query flow runs using python….we want to check if a flow is currently running else we will be creating a run for it.
    Vamsi Reddy
    Kevin Kho
    16 replies
    Copy to Clipboard
  • d

    Daniel Saxton

    7 months ago
    What's the easiest way to cancel a flow based on a condition (like say you have a pipeline that checks for a file and only continues if it's found)?
    d
    1 replies
    Copy to Clipboard