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

fix: Exclude information_schema and pg_catalog from discovery #551

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
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
Loading