Skip to content

feat(dataplex): add global data quality scan sample#14327

Open
XrossFox wants to merge 10 commits into
GoogleCloudPlatform:mainfrom
XrossFox:dataplex-scan-data-quality-global
Open

feat(dataplex): add global data quality scan sample#14327
XrossFox wants to merge 10 commits into
GoogleCloudPlatform:mainfrom
XrossFox:dataplex-scan-data-quality-global

Conversation

@XrossFox

@XrossFox XrossFox commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add new data_quality_scan_global.py sample demonstrating how to create a global data quality scan
  • Add requirements.txt for the new sample

Fixes b/524660077

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

 - Add new `data_quality_scan_global.py` sample demonstrating how to create a global data quality scan
 - Add `requirements.txt` for the new sample
@product-auto-label product-auto-label Bot added api: dataplex Issues related to the Knowledge Catalog API. samples Issues that are directly related to samples. labels Jun 16, 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 script to create a Dataplex Data Quality Scan using global API endpoint routing, along with its dependency requirements. Feedback on the changes highlights a SQL syntax error due to a missing space in the concatenated query string, and a return type mismatch caused by catching exceptions and implicitly returning None instead of the annotated DataScan type.

Comment thread dataplex/scan/data_quality_scan_global.py Outdated
Comment thread dataplex/snippets/create_data_quality_scan_global.py
@XrossFox

Copy link
Copy Markdown
Contributor Author

The sample is working locally:

Screenshot 2026-06-17 11 22 15 AM

Data scan is created successfully and visible on GCP Web Interface.

Screenshot 2026-06-17 11 36 27 AM

@XrossFox XrossFox marked this pull request as ready for review June 17, 2026 17:38
@XrossFox XrossFox requested review from a team as code owners June 17, 2026 17:38
@snippet-bot

snippet-bot Bot commented Jun 17, 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

Comment thread dataplex/scan/data_quality_scan_global.py Outdated

@Kef131 Kef131 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm

@amcolin amcolin 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.

Including this sample within the snippets directory instead of creating a new folder seems ideal. Additionally, renaming it to create_data_quality_scan_global.py would ensure consistency with the existing patterns in this repository and avoid conflicts with the operations we are planning to add.

Comment thread dataplex/scan/data_quality_scan_global.py Outdated
dataset_id: str,
table_id: str,
location: str,
column_id_1: str,

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.

Are these column IDs required, or is it possible to omit them from the parameters?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This sample expects a bigquery table with at least 2 columns, with names provided by the user.

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.

can you update the description to include the arguments and expectations? Thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hello, i've added proper docs to the method with attribute despritions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: dataplex Issues related to the Knowledge Catalog API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants