{"id":21109,"library":"dbt-core-interface","title":"dbt-core-interface","description":"A Python library providing an interface for interacting with dbt Core programmatically. It abstracts invocation, artifact parsing, and project management. Current version: 1.1.7, requires Python >=3.10 and <3.14. Active development with frequent releases.","status":"active","version":"1.1.7","language":"python","source_language":"en","source_url":"https://github.com/z3z1ma/dbt-core-interface","tags":["dbt","data-engineering","etl","analytics-engineering"],"install":[{"cmd":"pip install dbt-core-interface","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency required for dbt operations.","package":"dbt-core","optional":false}],"imports":[{"note":"The main class is directly importable from the package; importing from the nested module is unnecessary and can break refactoring.","wrong":"from dbt_core_interface.dbt_core_interface import DbtCoreInterface","symbol":"DbtCoreInterface","correct":"from dbt_core_interface import DbtCoreInterface"}],"quickstart":{"code":"import os\nfrom dbt_core_interface import DbtCoreInterface\n\ndbt = DbtCoreInterface()\nresult = dbt.run(select='my_model')\nprint(result.success, result.logs)","lang":"python","description":"Initialize the interface and run a dbt model."},"warnings":[{"fix":"Update calls to `DbtCoreInterface(project_dir='/path', profiles_dir='/path')` to accept the new defaults or remove explicit paths if they match the working directory.","message":"The API changed significantly between v1.0.x and v1.1.x. The old `DbtCoreInterface` constructor required explicit project and profile paths; now these are optional and auto-detected.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Replace `dbt.invoke_dbt(['run', '--select', 'my_model'])` with `dbt.run(select='my_model')`.","message":"The `invoke_dbt` method is deprecated in v1.1.0+. Use `run`, `compile`, `test`, etc. instead.","severity":"deprecated","affected_versions":">=1.1.0"},{"fix":"Set `capture_output=False` in the DbtCoreInterface constructor to see live logs.","message":"Running dbt inside a subprocess may produce unexpected log outputs. The library captures stdout/stderr but does not forward them in real-time by default.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure dbt-core and any required dbt adapters (e.g., dbt-postgres, dbt-snowflake) are installed alongside dbt-core-interface.","message":"The library requires dbt-core to be installed in the same Python environment. If multiple dbt adapters are needed, they must be installed separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install dbt-core-interface` in the correct environment (e.g., the virtual environment you're using).","cause":"Package not installed or installed in a different Python environment.","error":"ModuleNotFoundError: No module named 'dbt_core_interface'"},{"fix":"Use the dedicated methods like `run()`, `compile()`, `test()` instead.","cause":"The `invoke_dbt` method was removed in v1.1.0.","error":"AttributeError: 'DbtCoreInterface' object has no attribute 'invoke_dbt'"},{"fix":"Explicitly set `profiles_dir` in the constructor: `DbtCoreInterface(profiles_dir='/path/to/profiles')`.","cause":"Multiple dbt profiles found or profiles_dir not set correctly.","error":"dbt.exceptions.RuntimeException: Runtime Error\n  Encountered an error:\n  Can't determine which profile to use."},{"fix":"Upgrade to v1.1.0 or later: `pip install --upgrade dbt-core-interface`.","cause":"The `capture_output` parameter was added in v1.1.0. Using it with an older version raises this error.","error":"TypeError: DbtCoreInterface.__init__() got an unexpected keyword argument 'capture_output'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}