data-autocleaning

Profiles and cleans BigQuery and GCS data using Dataplex scans and SQL transformations.

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/DingJun1028/esggo-kv --skill data-autocleaning-dingjun1028
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-autocleaning
Source: https://github.com/DingJun1028/esggo-kv/tree/main/.agents/skills/data-autocleaning
Command: npx skills add https://github.com/DingJun1028/esggo-kv --skill data-autocleaning-dingjun1028

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Data pipelines built on BigQuery or Google Cloud Storage often contain hidden quality issues such as garbage values, inconsistent date formats, malformed JSON, and schema mismatches. This Skill automates profiling, cleansing, and verification so every data movement or ingestion task is grounded in real profile evidence rather than guesswork. ## Core Features & Use Cases - Dataplex-Based Profiling: Runs automated data profile scans (with dynamic sampling for tables over 1M rows) before and after transformations to detect nulls, anomalies, and distribution shifts. - SQL Transformation Generation: Produces cleaning SQL covering schema alignment, type conversion with SAFE.PARSE functions, JSON parsing, array handling, and STRUCT field mapping. - Quality Review Protocol: Validates transformations by profiling a temporary sample output table and comparing results against the source profile, iterating until anomalies are resolved. - Use Case: When copying a raw GCS export into a curated BigQuery table, the Skill profiles the source, generates cleansing SQL for malformed dates and JSON fields, then verifies the output profile shows no unexpected NULL increases. ## Quick Start Ask the agent to clean and load data from a BigQuery table or GCS path into a destination table, and it will profile the source with Dataplex, generate the cleansing SQL, and verify the results.

Frequently Asked Questions about data-autocleaning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean data when moving it from GCS to BigQuery?▼

Create an external table over the GCS source, run a Dataplex data profile scan to detect anomalies, then generate cleansing SQL for issues like malformed dates or garbage values. Verify the result by profiling a temporary output table and comparing profiles.

How to profile BigQuery tables with Dataplex before transformation?▼

Use the dataplex_scanner.py script with table IDs in project.dataset.table format, a specific region like us-central1, and an output directory. It handles concurrent scans, dynamic sampling for tables over 1M rows, and saves results as JSON.

Does Dataplex scanning work with multi-region BigQuery locations?▼

No, Dataplex data profile scans require a specific Google Cloud region such as us-central1. Multi-region locations like us are not supported, so you must specify a regional location for the scan.

How should JSON columns be parsed in BigQuery cleaning SQL?▼

Use SAFE.PARSE_JSON to cast JSON strings to the JSON type, and extract fields with JSON_VALUE or JSON_QUERY without a SAFE prefix. Avoid deprecated JSON_EXTRACT functions, and keep the original string if parsing returns NULL.

What happens if the user denies the Dataplex scan approval?▼

The denial reason is documented in the implementation plan instead of a Job ID, and verification falls back to manual bq sample queries. The scanner script is not run again and approval is not re-requested.