Skip to content

Commit b87647d

Browse files
Revert "feat: Filter out system views out of system namespaces (#22221)" (#22425)
This reverts commit 3bf87a9.
1 parent d2e98ff commit b87647d

File tree

11 files changed

+6
-40
lines changed

11 files changed

+6
-40
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@
13621362
- name: Postgres
13631363
sourceDefinitionId: decd338e-5647-4c0b-adf4-da0e75f5a750
13641364
dockerRepository: airbyte/source-postgres
1365-
dockerImageTag: 1.0.43
1365+
dockerImageTag: 1.0.42
13661366
documentationUrl: https://docs.airbyte.com/integrations/sources/postgres
13671367
icon: postgresql.svg
13681368
sourceType: database

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11606,7 +11606,7 @@
1160611606
supportsNormalization: false
1160711607
supportsDBT: false
1160811608
supported_destination_sync_modes: []
11609-
- dockerImage: "airbyte/source-postgres:1.0.43"
11609+
- dockerImage: "airbyte/source-postgres:1.0.42"
1161011610
spec:
1161111611
documentationUrl: "https://docs.airbyte.com/integrations/sources/postgres"
1161211612
connectionSpecification:

airbyte-integrations/connectors/source-bigquery/src/main/java/io/airbyte/integrations/source/bigquery/BigQuerySource.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ public Set<String> getExcludedInternalNameSpaces() {
101101
return Collections.emptySet();
102102
}
103103

104-
@Override
105-
protected Set<String> getExcludedViews() {
106-
return Collections.emptySet();
107-
}
108-
109104
@Override
110105
protected List<TableInfo<CommonField<StandardSQLTypeName>>> discoverInternal(final BigQueryDatabase database) throws Exception {
111106
return discoverInternal(database, null);

airbyte-integrations/connectors/source-jdbc/src/main/java/io/airbyte/integrations/source/jdbc/JdbcSource.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ public Set<String> getExcludedInternalNameSpaces() {
3434
return Set.of("information_schema", "pg_catalog", "pg_internal", "catalog_history");
3535
}
3636

37-
@Override
38-
protected Set<String> getExcludedViews() {
39-
return Set.of("pg_stat_statements", "pg_stat_statements_info");
40-
}
41-
4237
public static void main(final String[] args) throws Exception {
4338
final Source source = new JdbcSource();
4439
LOGGER.info("starting source: {}", JdbcSource.class);

airbyte-integrations/connectors/source-mongodb-v2/src/main/java/io.airbyte.integrations.source.mongodb/MongoDbSource.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ public Set<String> getExcludedInternalNameSpaces() {
9696
return Collections.emptySet();
9797
}
9898

99-
@Override
100-
protected Set<String> getExcludedViews() {
101-
return Collections.emptySet();
102-
}
103-
10499
@Override
105100
protected List<TableInfo<CommonField<BsonType>>> discoverInternal(final MongoDatabase database)
106101
throws Exception {

airbyte-integrations/connectors/source-postgres-strict-encrypt/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-postgres-strict-encrypt
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=1.0.43
19+
LABEL io.airbyte.version=1.0.42
2020
LABEL io.airbyte.name=airbyte/source-postgres-strict-encrypt

airbyte-integrations/connectors/source-postgres/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ ENV APPLICATION source-postgres
1616

1717
COPY --from=build /airbyte /airbyte
1818

19-
LABEL io.airbyte.version=1.0.43
19+
LABEL io.airbyte.version=1.0.42
2020
LABEL io.airbyte.name=airbyte/source-postgres

airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/PostgresSource.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,6 @@ public Set<String> getExcludedInternalNameSpaces() {
202202
return Set.of("information_schema", "pg_catalog", "pg_internal", "catalog_history");
203203
}
204204

205-
@Override
206-
protected Set<String> getExcludedViews() {
207-
return Set.of("pg_stat_statements", "pg_stat_statements_info");
208-
}
209-
210205
@Override
211206
public AirbyteCatalog discover(final JsonNode config) throws Exception {
212207
final AirbyteCatalog catalog = super.discover(config);

airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/PostgresStressTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ public Set<String> getExcludedInternalNameSpaces() {
123123
return Set.of("information_schema", "pg_catalog", "pg_internal", "catalog_history");
124124
}
125125

126-
@Override
127-
protected Set<String> getExcludedViews() {
128-
return Set.of("pg_stat_statements", "pg_stat_statements_info");
129-
}
130-
131126
public static void main(final String[] args) throws Exception {
132127
final Source source = new PostgresTestSource();
133128
LOGGER.info("starting source: {}", PostgresTestSource.class);

airbyte-integrations/connectors/source-relational-db/src/main/java/io/airbyte/integrations/source/relationaldb/AbstractDbSource.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,10 @@ private List<TableInfo<CommonField<DataType>>> discoverWithoutSystemTables(
271271
final Database database)
272272
throws Exception {
273273
final Set<String> systemNameSpaces = getExcludedInternalNameSpaces();
274-
final Set<String> systemViews = getExcludedViews();
275274
final List<TableInfo<CommonField<DataType>>> discoveredTables = discoverInternal(database);
276275
return (systemNameSpaces == null || systemNameSpaces.isEmpty() ? discoveredTables
277276
: discoveredTables.stream()
278-
.filter(table -> !systemNameSpaces.contains(table.getNameSpace()) && !systemViews.contains(table.getName())).collect(
277+
.filter(table -> !systemNameSpaces.contains(table.getNameSpace())).collect(
279278
Collectors.toList()));
280279
}
281280

@@ -635,19 +634,12 @@ protected abstract List<CheckedConsumer<Database, Exception>> getCheckOperations
635634
protected abstract JsonSchemaType getAirbyteType(DataType columnType);
636635

637636
/**
638-
* Get list of system namespaces(schemas) in order to exclude them from the `discover` result list.
637+
* Get list of system namespaces(schemas) in order to exclude them from the discover result list.
639638
*
640639
* @return set of system namespaces(schemas) to be excluded
641640
*/
642641
protected abstract Set<String> getExcludedInternalNameSpaces();
643642

644-
/**
645-
* Get list of system views in order to exclude them from the `discover` result list.
646-
*
647-
* @return set of views to be excluded
648-
*/
649-
protected abstract Set<String> getExcludedViews();
650-
651643
/**
652644
* Discover all available tables in the source database.
653645
*

docs/integrations/sources/postgres.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ The root causes is that the WALs needed for the incremental sync has been remove
411411

412412
| Version | Date | Pull Request | Subject |
413413
|:--------|:-----------|:---------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
414-
| 1.0.43 | 2022-02-06 | [22221](https://github.com/airbytehq/airbyte/pull/22221) | Exclude new set of system tables when using `pg_stat_statements` extension. |
415414
| 1.0.42 | 2022-01-23 | [21523](https://github.com/airbytehq/airbyte/pull/21523) | Check for null in cursor values before replacing. |
416415
| 1.0.41 | 2022-01-25 | [20939](https://github.com/airbytehq/airbyte/pull/20939) | Adjust batch selection memory limits databases. |
417416
| 1.0.40 | 2023-01-24 | [21825](https://github.com/airbytehq/airbyte/pull/21825) | Put back the original change that will cause an incremental sync to error if table contains a NULL value in cursor column. |

0 commit comments

Comments
 (0)