Hello folks. I've developed some basic integration of prefect with meltano: https://github.com/Broscorp-net/prefect-meltano
This one doesn't use shellcommand to wrap meltano commands, but instead could execute tap and target as separate tasks. It only works with recent singer_sdk based taps/targets but it could be adjusted later. Your comments and PRs are welcome 🙂
hi @Mykhail Martsyniuk - thanks for sharing! looks great catjam
one question on the wrapper task you wrote (e.g. here):
what made you want to use this pattern?
Async Prefect task wrapper around run_singer_tap.
Executes the synchronous run_singer_tap in a thread to avoid blocking the event loop.
but I'm asking because if you have a normal task
Copy code
@task
def foo(): ...
you can use built-in task functionality to send it to a thread pool via
submit
like
Copy code
foo() # runs in the main thread
foo.submit().result() # runs in a worker thread
m
Mykhail Martsyniuk
09/15/2025, 3:03 PM
wow, that's cool feedback, thanks!
We only use async flows so i created it with this in mind, just to have async tasks too.
And reason for async tasks is to actually start piping to the destination before tap completes.
Mykhail Martsyniuk
09/15/2025, 3:09 PM
But i guess to fully support this pattern i need to provide reference to InMemoryFile externally to both tasks. Haven't come up with proper arch there yet 🙂
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.