Proposal would be to add something like excluded_schema_names to streamline the operation below, which excludes information_schema from catalog generation:
|
# overridden to filter out the information_schema from catalog discovery |
|
def discover_catalog_entries(self) -> list[dict]: |
|
"""Return a list of catalog entries from discovery. |
|
|
|
Returns: |
|
The discovered catalog entries as a list. |
|
""" |
|
result: list[dict] = [] |
|
engine = self.create_sqlalchemy_engine() |
|
inspected = sqlalchemy.inspect(engine) |
|
schema_names = [ |
|
schema_name |
|
for schema_name in self.get_schema_names(engine, inspected) |
|
if schema_name.lower() != "information_schema" |
|
] |
|
for schema_name in schema_names: |
|
# Iterate through each table and view |
|
for table_name, is_view in self.get_object_names( |
|
engine, inspected, schema_name |
|
): |
|
catalog_entry = self.discover_catalog_entry( |
|
engine, inspected, schema_name, table_name, is_view |
|
) |
|
result.append(catalog_entry.to_dict()) |
|
|
|
return result |
Should probably be an SDK feature so that target developers can more easily implement.
Proposal would be to add something like
excluded_schema_namesto streamline the operation below, which excludesinformation_schemafrom catalog generation:tap-snowflake/tap_snowflake/client.py
Lines 52 to 77 in 5d7aef2
Should probably be an SDK feature so that target developers can more easily implement.