diff --git a/CHANGELOG.md b/CHANGELOG.md index ecec7fbc..fee7c50e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Persist table comments for incremental models, snapshots and dbt clone (thanks @henlue!) ([750](https://github.com/databricks/dbt-databricks/pull/750)) - Update tblproperties on incremental runs. Note: only adds/edits. Deletes are too risky/complex for now ([765](https://github.com/databricks/dbt-databricks/pull/765)) +- Update default scope/redirect Url for OAuth U2M, so with default OAuth app user can run python models ([776](https://github.com/databricks/dbt-databricks/pull/776)) ## dbt-databricks 1.8.5 (August 6, 2024) diff --git a/dbt/adapters/databricks/credentials.py b/dbt/adapters/databricks/credentials.py index e8897d40..27b3a4ca 100644 --- a/dbt/adapters/databricks/credentials.py +++ b/dbt/adapters/databricks/credentials.py @@ -273,17 +273,8 @@ def authenticate(self, in_provider: Optional[TCredentialProvider]) -> TCredentia return provider client_id = self.client_id or CLIENT_ID - - if client_id == "dbt-databricks": - # This is the temp code to make client id dbt-databricks work with server, - # currently the redirect url and scope for client dbt-databricks are fixed - # values as below. It can be removed after Databricks extends dbt-databricks - # scope to all-apis - redirect_url = "http://localhost:8050" - scopes = ["sql", "offline_access"] - else: - redirect_url = self.oauth_redirect_url or REDIRECT_URL - scopes = self.oauth_scopes or SCOPES + redirect_url = self.oauth_redirect_url or REDIRECT_URL + scopes = self.oauth_scopes or SCOPES oauth_client = OAuthClient( host=host,