Adding tags to collection (prefect-dbt, prefect-airbyte) tasks

What’s the recommended approach to adding tags to tasks contained within collections. For example, I want to tag all of my airbyte run with the pre-built trigger_sync function with a particular tag to enforce a concurrency limit for syncs.

Simply adding the tags=["something"] doesn’t work. Should I call trigger_sync as a function from within a new task?

I swear I read these docs 5 times, but somehow missed the answer in plain sight. In case anyone finds this thread later with the same question:

from prefect import flow, task
from prefect import tags

@task
def my_task():
    print("Hello, I'm a task")

@flow
def my_flow():
    with tags("test"):
        my_task()
1 Like