"""Run dbt against the Databend / TiDB Cloud Lake target. This entrypoint lets Airflow and local scripts run the dbt CLI inside the transform extra's dependency environment. The Databend adapter itself is pinned to the tested fork branch that handles the gateway warehouse parameter and dbt seed INSERT path. Usage (env loaded from repo .env): uv run --extra transform --env-file .env -- \ python transform/dbt/engine/run_dbt.py \ --project-dir transform/dbt --profiles-dir transform/dbt """ from __future__ import annotations import sys def main() -> int: from dbt.cli.main import cli # Click's standalone_mode handles its own SystemExit; just delegate argv. return cli(args=sys.argv[1:], standalone_mode=True) if __name__ == "__main__": main()