mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-14 10:18:23 +00:00
parent
607440f804
commit
fe04b0a201
@ -21,7 +21,7 @@ runs:
|
|||||||
- name: Install Ubuntu dependencies
|
- name: Install Ubuntu dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
|
sudo apt-get update && sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \
|
||||||
unixodbc-dev libevent-dev python3-dev libkrb5-dev
|
libevent-dev python3-dev libkrb5-dev tdsodbc && ACCEPT_EULA=Y sudo apt-get -qq install -y msodbcsql18
|
||||||
shell: bash
|
shell: bash
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ from metadata.generated.schema.entity.automations.workflow import (
|
|||||||
)
|
)
|
||||||
from metadata.generated.schema.entity.services.connections.database.azureSQLConnection import (
|
from metadata.generated.schema.entity.services.connections.database.azureSQLConnection import (
|
||||||
Authentication,
|
Authentication,
|
||||||
|
AuthenticationMode,
|
||||||
AzureSQLConnection,
|
AzureSQLConnection,
|
||||||
)
|
)
|
||||||
from metadata.generated.schema.entity.services.connections.database.mssqlConnection import (
|
from metadata.generated.schema.entity.services.connections.database.mssqlConnection import (
|
||||||
@ -42,7 +43,8 @@ def get_connection_url(connection: Union[AzureSQLConnection, MssqlConnection]) -
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if (
|
if (
|
||||||
hasattr(connection.authenticationMode, "authentication")
|
isinstance(connection, AzureSQLConnection)
|
||||||
|
and isinstance(connection.authenticationMode, AuthenticationMode)
|
||||||
and connection.authenticationMode.authentication is not None
|
and connection.authenticationMode.authentication is not None
|
||||||
):
|
):
|
||||||
connection_string = f"Driver={connection.driver};Server={connection.hostPort};Database={connection.database};"
|
connection_string = f"Driver={connection.driver};Server={connection.hostPort};Database={connection.database};"
|
||||||
@ -82,7 +84,7 @@ def get_connection_url(connection: Union[AzureSQLConnection, MssqlConnection]) -
|
|||||||
params = "&".join(
|
params = "&".join(
|
||||||
f"{key}={quote_plus(value)}" for key, value in options.items() if value
|
f"{key}={quote_plus(value)}" for key, value in options.items() if value
|
||||||
)
|
)
|
||||||
url = f"{url}?{params}"
|
url = f"{url}&{params}"
|
||||||
|
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
@ -3,8 +3,6 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from docker_utils import try_bind
|
|
||||||
from markers import xfail_param
|
|
||||||
from sqlalchemy import create_engine, text
|
from sqlalchemy import create_engine, text
|
||||||
from testcontainers.mssql import SqlServerContainer
|
from testcontainers.mssql import SqlServerContainer
|
||||||
|
|
||||||
@ -16,6 +14,9 @@ from metadata.ingestion.lineage.sql_lineage import search_cache
|
|||||||
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
from metadata.ingestion.ometa.ometa_api import OpenMetadata
|
||||||
from metadata.workflow.metadata import MetadataWorkflow
|
from metadata.workflow.metadata import MetadataWorkflow
|
||||||
|
|
||||||
|
from ...helpers.docker_utils import try_bind
|
||||||
|
from ...helpers.markers import xfail_param
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session", autouse=True)
|
@pytest.fixture(scope="session", autouse=True)
|
||||||
def config_logging():
|
def config_logging():
|
||||||
@ -104,10 +105,7 @@ def mssql_server_config(mssql_container, request):
|
|||||||
scope="module",
|
scope="module",
|
||||||
params=[
|
params=[
|
||||||
MssqlScheme.mssql_pytds,
|
MssqlScheme.mssql_pytds,
|
||||||
xfail_param(
|
MssqlScheme.mssql_pyodbc,
|
||||||
MssqlScheme.mssql_pyodbc,
|
|
||||||
"sql server fails with pyodbc (https://github.com/open-metadata/OpenMetadata/issues/16435)",
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def ingest_metadata(mssql_container, metadata: OpenMetadata, request):
|
def ingest_metadata(mssql_container, metadata: OpenMetadata, request):
|
||||||
@ -125,6 +123,7 @@ def ingest_metadata(mssql_container, metadata: OpenMetadata, request):
|
|||||||
+ mssql_container.get_exposed_port(mssql_container.port),
|
+ mssql_container.get_exposed_port(mssql_container.port),
|
||||||
"database": "AdventureWorks",
|
"database": "AdventureWorks",
|
||||||
"ingestAllDatabases": True,
|
"ingestAllDatabases": True,
|
||||||
|
"connectionOptions": {"TrustServerCertificate": "yes"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sourceConfig": {
|
"sourceConfig": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user