Skip to content

Commit

Permalink
filter out "airbyte_internal" in get_schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Chatterjee committed Apr 28, 2024
1 parent 78ef9c5 commit 3b966cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dbt_automation/utils/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_tables(self, schema: str) -> list:
def get_schemas(self) -> list:
"""returns the list of schema names in the given connection"""
datasets = self.bqclient.list_datasets()
return [x.dataset_id for x in datasets]
return [x.dataset_id for x in datasets if x.dataset_id != "airbyte_internal"]

def get_table_columns(self, schema: str, table: str) -> list:
"""fetch the list of columns from a BigQuery table along with their data types."""
Expand Down Expand Up @@ -262,6 +262,6 @@ def get_column_data_types(self) -> list:
"STRING",
"STRUCT",
"TIME",
"TIMESTAMP"
"TIMESTAMP",
]
return bigquery_data_types
2 changes: 1 addition & 1 deletion dbt_automation/utils/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def get_schemas(self) -> list:
"""
SELECT nspname
FROM pg_namespace
WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema';
WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema' AND nspname != 'airbyte_internal';
"""
)
return [x[0] for x in resultset]
Expand Down

0 comments on commit 3b966cb

Please sign in to comment.