Skip to content

Commit 6b18802

Browse files
fix: Exclude information_schema and pg_catalog from discovery
1 parent f94ed06 commit 6b18802

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tap_postgres/tap.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ class TapPostgres(SQLTap):
3939
package_name = "meltanolabs-tap-postgres"
4040
default_stream_class = PostgresStream
4141

42+
exclude_schemas = (
43+
"information_schema",
44+
"pg_catalog",
45+
)
46+
4247
def __init__(
4348
self,
4449
*args,
@@ -561,7 +566,11 @@ def catalog_dict(self) -> dict:
561566
return self.input_catalog.to_dict()
562567

563568
result: dict[str, list[dict]] = {"streams": []}
564-
result["streams"].extend(self.connector.discover_catalog_entries())
569+
result["streams"].extend(
570+
self.connector.discover_catalog_entries(
571+
exclude_schemas=self.exclude_schemas,
572+
)
573+
)
565574

566575
self._catalog_dict: dict = result
567576
return self._catalog_dict

0 commit comments

Comments
 (0)