Skip to content

feat(bigquery): add dataplex_get_data_profile_scan sample to get a Da… - #14736

Merged
iennae merged 1 commit into
mainfrom
feat/bq-dataplex-get-data-profile-scan
Nov 4, 2026
Merged

iennae merged 1 commit into
mainfrom
feat/bq-dataplex-get-data-profile-scan

Conversation

@iennae

@iennae iennae commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

…taplex data profile scan and latest results

Problem:
The Dataplex documentation (https://cloud.google.com/dataplex/docs/use-data-profiling#most-recent-scan) needs a standalone, tested Python code sample demonstrating how to get a Dataplex data profile scan and latest results (region tag dataplex_get_data_profile_scan).

Solution:

  • Add get_data_profile_scan(project_id: str, location: str, data_scan_id: str) -> None in bigquery/data_profile_scan/dataplex_get_data_profile_scan.py (Retrieve a Dataplex DataScan resource with DataScanView.FULL to inspect its configuration and most recent profile scan results.)
  • Add unit tests (bigquery/data_profile_scan/dataplex_get_data_profile_scan_test.py) covering both the success path and API error handling (GoogleAPICallError)

Description

Fixes #

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@iennae
iennae requested review from a team and chalmerlowe as code owners November 2, 2026 23:22
@snippet-bot

snippet-bot Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added api: bigquery Issues related to the BigQuery API. samples Issues that are directly related to samples. labels Nov 2, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Python sample to retrieve a Dataplex data profile scan and its latest profile results, along with corresponding unit tests and configuration files. The feedback highlights two main improvements: first, adding a defensive check in dataplex_get_data_profile_scan.py to prevent a potential AttributeError when scan.data_profile_result is unpopulated; second, updating the ignored Python versions in noxfile_config.py to align with repository guidelines by testing only the oldest and newest supported releases.

@iennae
iennae force-pushed the feat/bq-dataplex-get-data-profile-scan branch 2 times, most recently from de954fc to db86c7f Compare November 3, 2026 02:44

@XrossFox XrossFox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…taplex data profile scan and latest results

Problem:
The Dataplex documentation (https://cloud.google.com/dataplex/docs/use-data-profiling#most-recent-scan)
needs a standalone, tested Python code sample demonstrating how to
get a Dataplex data profile scan and latest results (region tag `dataplex_get_data_profile_scan`).

Solution:
- Add `get_data_profile_scan(project_id: str, location: str, data_scan_id: str) -> None` in `bigquery/data_profile_scan/dataplex_get_data_profile_scan.py`
  (Retrieve a Dataplex DataScan resource with DataScanView.FULL to inspect its configuration and most recent profile scan results.)
- Add unit tests (`bigquery/data_profile_scan/dataplex_get_data_profile_scan_test.py`) covering both the success
  path and API error handling (`GoogleAPICallError`)
@iennae
iennae force-pushed the feat/bq-dataplex-get-data-profile-scan branch from db86c7f to 9df3a88 Compare November 3, 2026 23:32
@iennae
iennae merged commit 80b33d8 into main Nov 4, 2026
13 of 21 checks passed
@iennae
iennae deleted the feat/bq-dataplex-get-data-profile-scan branch November 4, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants