Hello I am trying to integrate prefect cloud with...
# prefect-community
p
Hello I am trying to integrate prefect cloud with Airbyte. But I am facing below error
ModuleNotFoundError: No module named 'prefect.tasks.airbyte'; 'prefect.tasks' is not a package
Have I missed to install any dependency ? I didnt see anything on airbyte/prefect pages
1
FYI I have already done
pip install prefect-airbyte
j
Are you using Prefect 1 or 2?
☝️ 1
p
2
j
Ah yes. The import you are using is for Prefect 1. Here are the docs for 2: https://prefecthq.github.io/prefect-airbyte/
a
can you follow the docs here https://prefecthq.github.io/prefect-airbyte/ to see which integrations are possible? There are no tasks in this collection but there are connections, configuration etc
p
@Anna Geller I am already following same page
pip dependency is installed but not able to find that module
a
there are no tasks
p
a
can you check examples from those docs? you may be using some outdated examples
p
Used the same example given on your page
a
try this:
Copy code
from prefect import flow
from prefect_airbyte.connections import trigger_sync


@flow
def example_trigger_sync_flow():

      # Run other tasks and subflows here

      trigger_sync(
            connection_id="your-connection-id-to-sync",
            poll_interval_s=3,
            status_updates=True
      )

example_trigger_sync_flow()
p
tried, doent work
a
perhaps you can try in a new environment? otherwise, it might be worth opening an issue in the collection repo, providing MRE and explaining what doesn't work as expected
p
I executed this basic dag , which is working
Copy code
from prefect import flow, get_run_logger

@flow(name="Testing")
def basic_flow():
    logger = get_run_logger()
    logger.warning("The fun is about to begin")

if __name__ == "__main__":
    basic_flow()
resolved it thanks
👍 1
🙌 1