mirror of
https://github.com/datahub-project/datahub.git
synced 2025-06-27 05:03:31 +00:00
Linting fixes
This commit is contained in:
parent
f9cef11491
commit
943cbfe673
@ -112,17 +112,16 @@ class UnityCatalogConnectionTest:
|
||||
server_hostname=config.workspace_url,
|
||||
http_path=f"/sql/1.0/warehouses/{config.warehouse_id}",
|
||||
access_token=token,
|
||||
) as connection:
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute("SELECT 1")
|
||||
result = cursor.fetchone()
|
||||
if not result:
|
||||
return TestConnectionReport(
|
||||
basic_connectivity=CapabilityReport(
|
||||
capable=False,
|
||||
failure_reason="Failed to execute test query",
|
||||
)
|
||||
) as connection, connection.cursor() as cursor:
|
||||
cursor.execute("SELECT 1")
|
||||
result = cursor.fetchone()
|
||||
if not result:
|
||||
return TestConnectionReport(
|
||||
basic_connectivity=CapabilityReport(
|
||||
capable=False,
|
||||
failure_reason="Failed to execute test query",
|
||||
)
|
||||
)
|
||||
except Exception as e:
|
||||
return TestConnectionReport(
|
||||
basic_connectivity=CapabilityReport(
|
||||
|
@ -6,9 +6,9 @@ from typing import Dict, Iterable, List, Optional, Set, Tuple, Union
|
||||
from urllib.parse import urljoin
|
||||
|
||||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from datahub.api.entities.external.external_entities import PlatformResourceRepository
|
||||
from datahub.api.entities.external.unity_catalog_external_entites import UnityCatalogTag
|
||||
|
||||
from datahub.emitter.mce_builder import (
|
||||
make_data_platform_urn,
|
||||
make_dataplatform_instance_urn,
|
||||
|
Loading…
x
Reference in New Issue
Block a user