Skip to content

Commit

Permalink
fix: Exclude information_schema and pg_catalog from discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Dec 3, 2024
1 parent d3ed6ca commit b4eb52d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tap_postgres/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ class TapPostgres(SQLTap):
name = "tap-postgres"
default_stream_class = PostgresStream

exclude_schemas = (
"information_schema",
"pg_catalog",
)

def __init__(
self,
*args,
Expand Down Expand Up @@ -547,7 +552,11 @@ def catalog_dict(self) -> dict:
return self.input_catalog.to_dict()

result: dict[str, list[dict]] = {"streams": []}
result["streams"].extend(self.connector.discover_catalog_entries())
result["streams"].extend(
self.connector.discover_catalog_entries(
exclude_schemas=self.exclude_schemas,
)
)

self._catalog_dict: dict = result
return self._catalog_dict
Expand Down

0 comments on commit b4eb52d

Please sign in to comment.