f

    FuETL

    6 months ago
    Hey guys, i have 2 parameters that at least one should be provided. Prefect have a built-in function to handle this case or should i create a task and validate inside? Thanks!
    Kevin Kho

    Kevin Kho

    6 months ago
    We don’t have a built-in function for that. I think you’d need to make your own task that raises a Failed state
    f

    FuETL

    6 months ago
    Great! Thanks Kevin!! Is like a required_if
    Kevin Kho

    Kevin Kho

    6 months ago
    @task
    def one_of(x, y):
        if (x or y) == None:
            raise FAIL()
        return
    like that? I dunno 😆