data-autocleaning

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

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/Jatinkrmahato993203/crime --skill data-autocleaning-jatinkrmahato993203
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: data-autocleaning
Source: https://github.com/Jatinkrmahato993203/crime/tree/main/skills/data-autocleaning
Command: npx skills add https://github.com/Jatinkrmahato993203/crime --skill data-autocleaning-jatinkrmahato993203

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Data ingested from BigQuery or Google Cloud Storage often contains malformed values, inconsistent formats, and schema mismatches that silently corrupt downstream pipelines. This Skill automates profiling, cleansing, and verification so every data movement or ingestion task produces validated, schema-aligned output. ## Core Features & Use Cases - Dataplex-Based Profiling: Automatically scans source tables (with dynamic sampling for tables over 1M rows) to detect nulls, garbage values, and format variance before writing any transformation. - SQL Transformation Generation: Produces cleaning logic for schema alignment, type conversion with SAFE.PARSE functions, JSON parsing, array handling, and STRUCT field mapping. - Quality Review Loop: Re-profiles a temporary output table and compares against the source profile to catch regressions like unexpected NULL increases. - Use Case: When asked to copy a GCS dataset into a BigQuery destination table, the Skill profiles the source, generates cleansing SQL matched to the destination schema, and verifies the result with a post-transformation Dataplex scan. ## Quick Start Ask the assistant to clean and load the BigQuery table my-project.my_dataset.my_table into the destination table using the data-autocleaning skill.

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 first, then run a Dataplex data profile scan to detect anomalies. Generate cleansing SQL transformations based on the profile, and verify the result by profiling a temporary output table before finalizing.

How do I profile a BigQuery table with Dataplex?▼

Run the dataplex_scanner.py script with the table ID in project.dataset.table format, a specific region like us-central1, and an output directory. The script handles dynamic sampling for tables over 1M rows, polls for results, and saves the profile as JSON.

Does Dataplex scanning support multi-region locations like us?▼

No, Dataplex data profile scans require a specific Google Cloud region such as us-central1. Multi-region locations like us are not supported and will cause the scan to fail.

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, which are safe by default. Avoid deprecated JSON_EXTRACT functions, and keep the original string if parsing returns NULL.

Why can't BigQuery arrays contain NULL values after SAFE_CAST?▼

BigQuery arrays do not support NULL elements, so casting failures must be filtered out using ARRAY_FILTER with an IS NOT NULL predicate. Deduplication can be done with ARRAY(SELECT DISTINCT x FROM UNNEST(...)) for case-sensitive results.

When should data cleaning transformations be skipped?▼

Transformations apply only to eligible BigQuery or GCS sources, and only to the source node of a pipeline. If the source is ineligible or the user denies the Dataplex scan, document the reason and proceed with manual bq sample verification instead.