diff --git a/src/preset_cli/api/clients/dbt.py b/src/preset_cli/api/clients/dbt.py index f6bdc3f..0a18a77 100644 --- a/src/preset_cli/api/clients/dbt.py +++ b/src/preset_cli/api/clients/dbt.py @@ -684,10 +684,12 @@ def get_custom_urls(access_url: Optional[str] = None) -> Dict[str, URL]: ), "discovery": parsed.with_host( f"{match['code']}.metadata.{match['region']}.dbt.com", - ), + ) + / "graphql", "semantic-layer": parsed.with_host( f"{match['code']}.semantic-layer.{match['region']}.dbt.com", - ), + ) + / "api/graphql", } raise Exception("Invalid host in custom URL") diff --git a/tests/api/clients/dbt_test.py b/tests/api/clients/dbt_test.py index 6dd9b65..62dfaa7 100644 --- a/tests/api/clients/dbt_test.py +++ b/tests/api/clients/dbt_test.py @@ -1377,8 +1377,8 @@ def test_get_custom_urls() -> None: assert get_custom_urls("https://ab123.us1.dbt.com") == { "admin": URL("https://ab123.us1.dbt.com"), - "discovery": URL("https://ab123.metadata.us1.dbt.com"), - "semantic-layer": URL("https://ab123.semantic-layer.us1.dbt.com"), + "discovery": URL("https://ab123.metadata.us1.dbt.com/graphql"), + "semantic-layer": URL("https://ab123.semantic-layer.us1.dbt.com/api/graphql"), } with pytest.raises(Exception) as excinfo: