File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
CosmoTech_Acceleration_Library Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 11# Copyright (C) - 2023 - 2025 - Cosmo Tech
22# Licensed under the MIT license.
33
4- __version__ = '0.9.3 '
4+ __version__ = '0.9.4 '
Original file line number Diff line number Diff line change 88from typing import Optional
99from urllib .parse import quote
1010
11+ import adbc_driver_manager
1112import pyarrow as pa
1213from adbc_driver_postgresql import dbapi
1314from pyarrow import Table
@@ -66,18 +67,11 @@ def get_postgresql_table_schema(
6667
6768 with (dbapi .connect (postgresql_full_uri ) as conn ):
6869 try :
69- catalog = conn .adbc_get_objects (depth = "tables" ,
70- catalog_filter = postgres_db ,
71- db_schema_filter = postgres_schema ,
72- table_name_filter = target_table_name ).read_all ().to_pylist ()[0 ]
73- schema = catalog ["catalog_db_schemas" ][0 ]
74- table = schema ["db_schema_tables" ][0 ]
75- if table ["table_name" ] == target_table_name :
76- return conn .adbc_get_table_schema (
77- target_table_name ,
78- db_schema_filter = postgres_schema ,
79- )
80- except IndexError :
70+ return conn .adbc_get_table_schema (
71+ target_table_name ,
72+ db_schema_filter = postgres_schema ,
73+ )
74+ except adbc_driver_manager .ProgrammingError :
8175 LOGGER .warning (f"Table { postgres_schema } .{ target_table_name } not found" )
8276 return None
8377
You can’t perform that action at this time.
0 commit comments