iyashk-DB
Databricks Employee
Databricks Employee

The sys.path you added is pointing to the wrong directory. For from databricks.labs.community_connector import ... to resolve, Python needs to find the src/ folder at the root of the cloned repo (the one that contains the databricks/ namespace directory), not a subdirectory inside it.

The clearest fix is to install the package directly in your notebook before running anything else:

%pip install -e /Workspace/Users/<your-user>/lakeflow-community-connectors

Restart the Python process after that (dbutils.library.restartPython()), and the imports should resolve.

If you'd rather keep the sys.path approach, the path needs to be the src/ directory at the top of the cloned repo, not a subdirectory of it:

import sys
sys.path.insert(0, "/Workspace/Users/<your-user>/lakeflow-community-connectors/src")

One more thing worth knowing: the pyproject.toml in that repo explicitly excludes databricks.labs.community_connector.sources.* from the installed wheel (the exclude in [tool.setuptools.packages.find]). So the connector source code (like graph_sharepoint_lists) isn't bundled into the package and is expected to be accessed directly from the workspace file path. As long as the src/ root is on your path, that's fine since Python will walk down into the sources directory from there.

If you're deploying through the official CLI (community-connector create_pipeline), it sets up a Git-backed DLT pipeline where the library paths are configured automatically. That flow avoids the manual path setup entirely.