Add password format to databrick's token (#4108)

This commit is contained in:
Ayush Shah 2022-04-13 11:43:52 -07:00 committed by GitHub
parent 781b59e73b
commit 9d8c831bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -48,8 +48,9 @@
"type": "string"
},
"token": {
"description": "",
"type": "string"
"description": "Generated Token to connect to Databricks",
"type": "string",
"format": "password"
},
"connectionOptions": {
"$ref": "../connectionBasicType.json#/definitions/connectionOptions"

View File

@ -170,7 +170,7 @@ def _(connection: TrinoConnection):
@get_connection_url.register
def _(connection: DatabricksConnection):
url = f"{connection.scheme.value}://token:{connection.token}@{connection.hostPort}"
url = f"{connection.scheme.value}://token:{connection.token.get_secret_value()}@{connection.hostPort}"
if connection.database:
url += f"/{connection.database}"
return url