{"id":1045,"library":"google-cloud-datacatalog","title":"Google Cloud Data Catalog","description":"Google Cloud Data Catalog is a fully managed, highly scalable data discovery and metadata management service. It allows users to discover, manage, and understand data assets across Google Cloud, supporting technical and business metadata. The Python client library, currently at version 3.30.0, provides programmatic access to the Data Catalog API and follows a regular release cadence as part of the broader `google-cloud-python` client libraries.","status":"active","version":"3.30.0","language":"python","source_language":"en","source_url":"https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-datacatalog","tags":["google cloud","data catalog","metadata","cataloging","dataplex","deprecation"],"install":[{"cmd":"pip install google-cloud-datacatalog","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core library for Google Cloud API clients","package":"google-api-core","optional":false},{"reason":"Authentication and authorization for Google APIs","package":"google-auth","optional":false},{"reason":"Pythonic wrappers for Protocol Buffers","package":"proto-plus","optional":false},{"reason":"Protocol Buffers message serialization library","package":"protobuf","optional":false}],"imports":[{"symbol":"DataCatalogClient","correct":"from google.cloud.datacatalog_v1 import DataCatalogClient"},{"note":"Contains protobuf message definitions like Entry, Tag, TagTemplate","symbol":"types","correct":"from google.cloud.datacatalog_v1 import types"}],"quickstart":{"code":"import os\nfrom google.cloud.datacatalog_v1 import DataCatalogClient\n\n# Set your Google Cloud project ID (e.g., from GOOGLE_CLOUD_PROJECT_ID env var)\n# or specify it directly.\nproject_id = os.environ.get('GOOGLE_CLOUD_PROJECT', 'your-gcp-project-id')\n\n# Create a client\ntry:\n    client = DataCatalogClient()\n    print(f\"Data Catalog client created successfully for project: {project_id}\")\n\n    # Example: List entry groups (pagination handled automatically)\n    parent = f\"projects/{project_id}/locations/us-central1\"\n    print(f\"Listing entry groups in {parent}...\")\n    for entry_group in client.list_entry_groups(parent=parent):\n        print(f\"  Entry Group: {entry_group.name}\")\n\n    print(\"Quickstart finished. Note: Data Catalog is migrating to Dataplex Universal Catalog.\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure the Data Catalog API is enabled and authentication is set up.\")\n    print(\"e.g., export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json\")\n","lang":"python","description":"Initializes the DataCatalogClient and attempts to list existing entry groups within a specified Google Cloud project and location. This example assumes default authentication (e.g., via `GOOGLE_APPLICATION_CREDENTIALS` environment variable or Google Cloud SDK)."},"warnings":[{"fix":"Migrate to Google Cloud Dataplex Universal Catalog for metadata management. Review Dataplex documentation for equivalent functionalities and migration guides. `pip install google-cloud-dataplex`.","message":"Google Cloud Data Catalog is deprecated in favor of Dataplex Universal Catalog. While the Data Catalog API and client library still function, new development should leverage Dataplex's comprehensive data management capabilities.","severity":"breaking","affected_versions":"All versions, as this is a product-level deprecation."},{"fix":"To enable logging without code changes, set `GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.datacatalog` (or a broader scope like `google`) in your environment. For code-based configuration, ensure `logging.getLogger(\"google\").propagate = True` if you need events to reach the root logger.","message":"The `google-cloud-datacatalog` client library logs RPC events using Python's standard logging, but logs may contain sensitive information and are not propagated to the root logger by default. You must configure logging explicitly.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade your Python environment to version 3.10 or higher. Re-install the library within a compatible virtual environment to ensure full support and receive future updates.","message":"Python 3.9 and older versions are past their end of life or no longer fully supported. While client libraries may still function, Google will not post further updates supporting Python 3.9, and critical bug fixes will be on a best-effort basis. It is recommended to upgrade to Python 3.10 or higher for full support and features.","severity":"gotcha","affected_versions":"< 3.10 (including 3.9)"},{"fix":"Configure Application Default Credentials (ADC) by following instructions at https://cloud.google.com/docs/authentication/external/set-up-adc. Additionally, ensure the Data Catalog API is enabled for your Google Cloud project via the Cloud Console or by running `gcloud services enable datacatalog.googleapis.com`.","message":"The client library failed to authenticate, indicating that Application Default Credentials (ADC) were not found or the Data Catalog API was not enabled for the project. Users must ensure ADC are properly configured and the Data Catalog API is enabled.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-05-12T23:06:20.358Z","next_check":"2026-06-30T00:00:00.000Z","problems":[{"fix":"Install the library using pip: `pip install google-cloud-datacatalog` or, if in a specific environment, `python -m pip install google-cloud-datacatalog`. Ensure your virtual environment is activated if you are using one.","cause":"The `google-cloud-datacatalog` library is not installed in the Python environment, or there's a conflict with other `google-cloud` libraries.","error":"ModuleNotFoundError: No module named 'google.cloud.datacatalog'"},{"fix":"Upgrade the `google-cloud-datacatalog` library to the latest version: `pip install --upgrade google-cloud-datacatalog`. Additionally, cross-reference your code with the official client library documentation for the correct usage of methods and types for your installed version.","cause":"This error typically occurs when the client library version used is incompatible with the API methods or types being called, often due to outdated sample code or an older library version lacking the specific attribute.","error":"AttributeError: module 'google.cloud.datacatalog_v1' has no attribute 'GetIamPolicyRequest'"},{"fix":"Verify that the `project_id` used in your code is correct. Ensure the Data Catalog API is enabled for your project in the Google Cloud Console (APIs & Services > Library). Also, confirm that the service account or user running the code has the necessary IAM permissions (e.g., `datacatalog.viewer` or `datacatalog.admin`) on the specified project.","cause":"This error often indicates that the specified Google Cloud project ID is incorrect, or the Data Catalog API is not enabled for that project, or the service account lacks permission to view the project or its resources.","error":"Error: 5 NOT_FOUND: Project \"your-project-id\" does not exist"},{"fix":"Grant the appropriate IAM role(s) to the service account or user. For common operations, roles like `Data Catalog Viewer` (`roles/datacatalog.viewer`), `Data Catalog Editor` (`roles/datacatalog.editor`), or more granular custom roles may be needed. Use the IAM console or `gcloud iam` commands to assign these roles to the principal accessing Data Catalog.","cause":"The service account or user credentials used to authenticate the Data Catalog client lack the necessary Identity and Access Management (IAM) permissions to perform the requested operation on the specified resource.","error":"google.api_core.exceptions.PermissionDenied: 403 The caller does not have permission"}],"ecosystem":"pypi","meta_description":null,"install_score":95,"install_tag":"verified","quickstart_score":null,"quickstart_tag":null,"pypi_latest":"3.30.0","cli_name":"","install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","installed_version":"3.30.0","pypi_latest":"3.30.0","is_stale":false,"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":2.03,"mem_mb":28.9,"disk_size":"72.3M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":2,"mem_mb":28.6,"disk_size":"71.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":6.1,"import_time_s":1.12,"mem_mb":22.6,"disk_size":"70M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.06,"mem_mb":22.2,"disk_size":"69M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":2.74,"mem_mb":30.7,"disk_size":"77.3M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":2.89,"mem_mb":30.4,"disk_size":"76.1M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":5.2,"import_time_s":1.68,"mem_mb":24.8,"disk_size":"75M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.73,"mem_mb":24.5,"disk_size":"74M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":2.63,"mem_mb":30.5,"disk_size":"68.7M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":2.8,"mem_mb":30.1,"disk_size":"67.5M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.4,"import_time_s":1.94,"mem_mb":24.7,"disk_size":"66M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":2.15,"mem_mb":23.8,"disk_size":"65M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":2.43,"mem_mb":30.9,"disk_size":"68.3M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":2.6,"mem_mb":30.6,"disk_size":"67.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":4.5,"import_time_s":1.87,"mem_mb":25,"disk_size":"66M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":2.02,"mem_mb":24.7,"disk_size":"65M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":null,"import_time_s":1.82,"mem_mb":28.9,"disk_size":"72.4M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.93,"mem_mb":28.6,"disk_size":"71.2M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"noisy","install_time_s":6.9,"import_time_s":1.27,"mem_mb":22.6,"disk_size":"70M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"google-cloud-datacatalog","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":1.25,"mem_mb":22.3,"disk_size":"69M"}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":null,"tag_description":null,"results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}