Abhishek

    Abhishek

    1 year ago
    Folks i am porting some of my Airflow jobs to prefect. And wanted to know, is FunctionTask behaviour is same as PythonOperator (Airflow operator) behaviour?
    Kevin Kho

    Kevin Kho

    1 year ago
    Hey @Abhishek, yes but from my understanding but Operators seem to be both source and sink in one. MSSql to S3. Prefect will just be one (MSSqlQuery and then UploadtoS3)
    Abhishek

    Abhishek

    1 year ago
    Thanks @Kevin Kho, got it. My current code in Airflow way uses PythonOperator to call a function to do x whenever a a dynamic task is getting created. Hence wanted to exact replacement of it ๐Ÿ˜ƒ Anyways, i got your point w.r.t โ€œPrefect wayโ€ ๐Ÿ˜ƒ
    Kevin Kho

    Kevin Kho

    1 year ago
    I think in Prefect you would just directly call the Python callable. Like wrap that callable in the
    @task
    decorator. If you get stuck and have a concrete code snippet, I can certainly help with that.
    Abhishek

    Abhishek

    1 year ago
    let me try that approach - i had a thought of that though. Let me try, if i get stuck, will ping you. thanks, appreciate your help ๐Ÿ™‚