GoogleCloudPlatform / GoogleCloudPlatform/knowledge-catalog-labs
business_glossary_export_v2.py usage as documented in https://cloud.google.com/dataplex/docs/migrate-glossaries fails
- Dominant language
- Python
- Stars
- 101
- Forks
- 47
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 4
Description
I am attempting to follow the directions in the [migration document](https://cloud.google.com/dataplex/docs/migrate-glossaries). While attempting to run the script as per [these instructions](https://cloud.google.com/dataplex/docs/migrate-glossaries#step-1). I get the following error:
``` ~/Dev/dataplex-labs/dataplex-q/00/scripts/python/business-glossary-import main ?1 python3 bg_import/business_glossary_export_v2.py --user-project="plos-data" --url="https://console.cloud.google.com/dataplex/glossaries/projects/970473524684/locations/global/entryGroups/dc_glossary_plos_business_glossarypgglqui/glossaries/plos_business_glossary6t8kluo" --debugging
15:57:26 : INFO : Debug logging to logs.txt is enabled.
15:57:28 : INFO : Fetching entries in the Glossary...
15:57:28 : ERROR : Can't proceed with export. Details: Method not found.
15:57:28 : ERROR : Can't proceed with export. Details: Method not found.
```
Output in the debug file:
``` ~/Dev/dataplex-labs/dataplex-q/00/scripts/python/business-glossary-import main ?2 cat logs_20250821_15* INT ✘
2025-08-21 15:35:47,780 - glossary_tool - INFO - setup_file_logging - Debug logging to logs.txt is enabled.
2025-08-21 15:35:49,296 - glossary_tool - INFO - main - Fetching entries in the Glossary...
2025-08-21 15:35:49,297 - glossary_tool - DEBUG - fetch_api_response - [GET https://datacatalog.googleapis.com/v2/projects/970473524684/locations/global/entryGroups/dc_glossary_plos_business_glossarypgglqui/entries?view=FULL&pageSize=1000] Initiating call with project_id: plos-data and request_body: None
2025-08-21 15:35:49,404 - glossary_tool - DEBUG - fetch_api_response - [GET https://datacatalog.googleapis.com/v2/projects/970473524684/locations/global/entryGroups/dc_glossary_plos_business_glossarypgglqui/entries?view=FULL&pageSize=1000] Response status: 404, Response text: {
"error": {
"code": 404,
"message": "Method not found.",
"status": "NOT_FOUND"
}
}
```
[logs_20250821_155726.txt](https://github.com/user-attachments/files/21927360/logs_20250821_155726.txt)
Expectation:
The script runs without errors.
Possible issue:
I'm not sure the datacatalog api is v2 as per https://github.com/GoogleCloudPlatform/dataplex-labs/blob/9ed7c76490b7345f1d0a8d9f8a55e5555d5cf607/dataplex-quickstart-labs/00-resources/scripts/python/business-glossary-import/bg_import/business_glossary_export_v2.py#L125 and
https://github.com/GoogleCloudPlatform/dataplex-labs/blob/9ed7c76490b7345f1d0a8d9f8a55e5555d5cf607/dataplex-quickstart-labs/00-resources/scripts/python/business-glossary-import/bg_import/utils.py#L20
I'm only seeing v1 and v1beta in https://cloud.google.com/data-catalog/docs/reference/rest
Contributor guide
Research direction
Start with bg_import/business_glossary_export_v2.py around the referenced API setup and inspect bg_import/utils.py around its client configuration. Reproduce the documented command and compare the requested endpoint and API version with the Data Catalog REST reference. Done means the script completes the glossary export without the “Method not found” error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, python
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100