diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index a42b9f9db29..d9eda8a3e85 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - py-version: ['3.7', '3.8', '3.9', '3.10'] + py-version: ['3.7', '3.8', '3.9'] steps: - name: Checkout uses: actions/checkout@v2 @@ -48,7 +48,7 @@ jobs: - name: Install Ubuntu dependencies run: | sudo apt-get install -y unixodbc-dev python3-venv librdkafka-dev gcc libsasl2-dev build-essential libssl-dev libffi-dev \ - librdkafka-dev unixodbc-dev libevent-dev + unixodbc-dev libevent-dev python3-dev - name: Generate models run: | diff --git a/ingestion/src/metadata/ingestion/source/database/bigquery.py b/ingestion/src/metadata/ingestion/source/database/bigquery.py index b0147f7ba9c..1f157eac488 100644 --- a/ingestion/src/metadata/ingestion/source/database/bigquery.py +++ b/ingestion/src/metadata/ingestion/source/database/bigquery.py @@ -49,7 +49,6 @@ from metadata.ingestion.models.ometa_tag_category import OMetaTagAndCategory from metadata.ingestion.source.database.column_type_parser import create_sqlalchemy_type from metadata.ingestion.source.database.common_db_source import CommonDbSourceService from metadata.utils import fqn -from metadata.utils.filters import filter_by_table from metadata.utils.logger import ingestion_logger logger = ingestion_logger() @@ -134,24 +133,28 @@ class BigquerySource(CommonDbSourceService): :param _: :return: """ - taxonomies = PolicyTagManagerClient().list_taxonomies( - parent=f"projects/{self.project_id}/locations/{self.service_connection.taxonomyLocation}" - ) - for taxonomy in taxonomies: - policiy_tags = PolicyTagManagerClient().list_policy_tags( - parent=taxonomy.name + try: + taxonomies = PolicyTagManagerClient().list_taxonomies( + parent=f"projects/{self.project_id}/locations/{self.service_connection.taxonomyLocation}" ) - for tag in policiy_tags: - yield OMetaTagAndCategory( - category_name=CreateTagCategoryRequest( - name=self.service_connection.tagCategoryName, - description="", - categoryType="Classification", - ), - category_details=CreateTagRequest( - name=tag.display_name, description="Bigquery Policy Tag" - ), + for taxonomy in taxonomies: + policiy_tags = PolicyTagManagerClient().list_policy_tags( + parent=taxonomy.name ) + for tag in policiy_tags: + yield OMetaTagAndCategory( + category_name=CreateTagCategoryRequest( + name=self.service_connection.tagCategoryName, + description="", + categoryType="Classification", + ), + category_details=CreateTagRequest( + name=tag.display_name, description="Bigquery Policy Tag" + ), + ) + except Exception as exc: + logger.debug(traceback.format_exc()) + logger.warning(f"Skipping Policy Tag: {exc}") def get_tag_labels(self, table_name: str) -> Optional[List[TagLabel]]: """