mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-25 18:30:00 +00:00
Fixes MSSQL default query issue (#4614)
This commit is contained in:
parent
c674408dbb
commit
dba6bf2adf
@ -16,6 +16,9 @@ from metadata.generated.schema.entity.services.connections.database.mssqlConnect
|
|||||||
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import (
|
from metadata.generated.schema.entity.services.connections.metadata.openMetadataConnection import (
|
||||||
OpenMetadataConnection,
|
OpenMetadataConnection,
|
||||||
)
|
)
|
||||||
|
from metadata.generated.schema.metadataIngestion.databaseServiceMetadataPipeline import (
|
||||||
|
DatabaseServiceMetadataPipeline,
|
||||||
|
)
|
||||||
from metadata.generated.schema.metadataIngestion.workflow import (
|
from metadata.generated.schema.metadataIngestion.workflow import (
|
||||||
Source as WorkflowSource,
|
Source as WorkflowSource,
|
||||||
)
|
)
|
||||||
@ -41,4 +44,8 @@ class MssqlSource(SQLSource):
|
|||||||
raise InvalidSourceException(
|
raise InvalidSourceException(
|
||||||
f"Expected MssqlConnection, but got {connection}"
|
f"Expected MssqlConnection, but got {connection}"
|
||||||
)
|
)
|
||||||
|
if config.sourceConfig.config.sampleDataQuery == "select * from {}.{} limit 50":
|
||||||
|
config.sourceConfig.config.sampleDataQuery = (
|
||||||
|
"select top 50 * from [{}].[{}]"
|
||||||
|
)
|
||||||
return cls(config, metadata_config)
|
return cls(config, metadata_config)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user