mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-26 02:40:08 +00:00
Fix 4582 - Looker instance error (#4607)
This commit is contained in:
parent
ca6f5b6cd6
commit
b4e143ff92
@ -15,8 +15,8 @@ from typing import Iterable
|
|||||||
|
|
||||||
import looker_sdk
|
import looker_sdk
|
||||||
|
|
||||||
from metadata.generated.schema.entity.services.connections.dashboard import (
|
from metadata.generated.schema.entity.services.connections.dashboard.lookerConnection import (
|
||||||
lookerConnection,
|
LookerConnection,
|
||||||
)
|
)
|
||||||
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import (
|
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import (
|
||||||
OpenMetadataConnection,
|
OpenMetadataConnection,
|
||||||
@ -82,8 +82,8 @@ class LookerSource(Source[Entity]):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, config_dict: dict, metadata_config: OpenMetadataConnection):
|
def create(cls, config_dict: dict, metadata_config: OpenMetadataConnection):
|
||||||
config = WorkflowSource.parse_obj(config_dict)
|
config = WorkflowSource.parse_obj(config_dict)
|
||||||
connection: lookerConnection = config.serviceConnection.__root__.config
|
connection: LookerConnection = config.serviceConnection.__root__.config
|
||||||
if not isinstance(connection, lookerConnection):
|
if not isinstance(connection, LookerConnection):
|
||||||
raise InvalidSourceException(
|
raise InvalidSourceException(
|
||||||
f"Expected LookerConnection, but got {connection}"
|
f"Expected LookerConnection, but got {connection}"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user