Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ingest/mssql): improve docs on using odbc #10370

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@
*pydantic_no_v2,
}

mssql_common = {
"sqlalchemy-pytds>=0.3",
"pyOpenSSL",
}

postgres_common = {
"psycopg2-binary",
"GeoAlchemy2",
Expand Down Expand Up @@ -371,12 +376,8 @@
},
"mode": {"requests", "tenacity>=8.0.1"} | sqllineage_lib | sqlglot_lib,
"mongodb": {"pymongo[srv]>=3.11", "packaging"},
"mssql": sql_common
| {
"sqlalchemy-pytds>=0.3",
"pyOpenSSL",
},
"mssql-odbc": sql_common | {"pyodbc"},
"mssql": sql_common | mssql_common,
"mssql-odbc": sql_common | mssql_common | {"pyodbc"},
"mysql": mysql,
# mariadb should have same dependency as mysql
"mariadb": sql_common | {"pymysql>=1.0.2"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class SQLServerSource(SQLAlchemySource):
- Column types associated with each table/view
- Table, row, and column statistics via optional SQL profiling
We have two options for the underlying library used to connect to SQL Server: (1) [python-tds](https://github.com/denisenkom/pytds) and (2) [pyodbc](https://github.com/mkleehammer/pyodbc). The TDS library is pure Python and hence easier to install.
If you do use pyodbc, make sure to change the source type from `mssql` to `mssql-odbc` so that we pull in the right set of dependencies. This will be needed in most cases where encryption is required, such as managed SQL Server services in Azure.
"""

def __init__(self, config: SQLServerConfig, ctx: PipelineContext):
Expand Down
Loading