Skip to content

Commit

Permalink
fix(dev-ex): Move pymssql import (#24634)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 authored Aug 28, 2024
1 parent a6f320b commit 5489f76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion posthog/warehouse/models/external_data_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import uuid
import psycopg2
import pymysql
import pymssql
from .external_data_source import ExternalDataSource
from posthog.warehouse.data_load.service import (
external_data_workflow_exists,
Expand Down Expand Up @@ -358,6 +357,9 @@ def get_mssql_schemas(
host: str, port: str, database: str, user: str, password: str, schema: str, ssh_tunnel: SSHTunnel
) -> dict[str, list[tuple[str, str]]]:
def get_schemas(postgres_host: str, postgres_port: int):
# Importing pymssql requires mssql drivers to be installed locally
import pymssql

connection = pymssql.connect(
server=postgres_host,
port=str(postgres_port),
Expand Down

0 comments on commit 5489f76

Please sign in to comment.