Aidp Profiling Tables

by oracle-samples90b42d6c24d4No licenseListed Oct 8, 2026Updated Oct 8, 2026

Profile an AIDP table — row count, per-column null %, distinct count, min/max/mean, and top-K values. Use when the user asks to profile a table, wants column statistics or a data-quality snapshot, or needs to understand a dataset's shape before using it. Runs bounded Spark SQL via the bundled aidp_sql.py helper.

Instructions onlyData & Analytics
AI-generated overview

Profiles an AIDP table with Spark SQL, producing per-column null rates, distinct counts, ranges and top values.

What it does
Produces a column-level profile of a single AIDP table by running bounded Spark SQL through a bundled helper script. It reports row count, per-column null percentage, approximate distinct counts, min/max/mean for numeric columns, date ranges, and top-K values for categorical columns. Results are returned as JSON from the helper and presented as a per-column table, with sampling noted when used.
When to use it
Use when someone asks to profile a table, wants column statistics or a data-quality snapshot, or needs to understand a dataset's shape before using it. It fits single-table profiling rather than multi-table analysis.
Requirements
Requires OCI access with an api_key DEFAULT profile (or a session-token profile), a region, datalake OCID, workspace and cluster key, and the bundled scripts/aidp_sql.py helper plus its referenced documentation. Control-plane lookups use oci raw-request; no AIDP MCP server is needed. Network access to OCI is required.

aidp-profiling-tables — single-table profile

Produce a column-level profile of an AIDP table via Spark SQL. Self-contained: control-plane lookups use oci raw-request; profiling SQL runs through the bundled scripts/aidp_sql.py helper. No aidp MCP server is required.

When to use

  • "Profile <table>", "what does <table> look like", "column stats / data quality snapshot".

Workflow

  1. Resolve the table (aidp-catalog-explore / .aidp/catalog.md) → fully-qualified catalog.schema.table and its columns/types. Without a cache, list via oci raw-request: GET /tables?catalogKey=<cat>&schemaKey=<cat.schema> and filter for the table client-side (see references/no-mcp-rest-map.md). Use the column types to pick the right per-column profiling SQL.
  2. Run bounded profiling SQL via the helper (one cell per call; the scratch notebook + kernel are managed for you):
    bash
    python "$PLUGIN_DIR/scripts/aidp_sql.py" --region <r> --datalake <ocid> --workspace <ws> --cluster <key> \  --code "spark.sql('''<profiling SQL>''').show(50, truncate=False)"
    • Overview: SELECT COUNT(*) FROM t (flag if LARGE; sample for the rest).
    • Numeric cols: MIN, MAX, AVG, COUNT, null %, approx distinct (approx_count_distinct).
    • String/categorical: null %, approx_count_distinct, top-K via GROUP BY … ORDER BY count DESC LIMIT k.
    • Date/timestamp: MIN/MAX range, null %. Use TABLESAMPLE/LIMIT on large tables to stay cheap; say when you sampled. The helper returns JSON (status, outputs, spark_job_ids) — parse outputs for the result rows.
  3. Present a per-column table: type, null %, distinct, min/max/mean (numeric), top values (categorical).
  4. Offer to feed findings into .aidp/catalog.md value dictionaries (aidp-catalog-init) and to add data-quality rules (aidp-data-quality).

Reliability rules

  • Profile from real query output, not assumptions; note sampling.
  • For very large tables, profile a sample and label it clearly.
  • The helper mints a UPST from the api_key DEFAULT profile and auto-creates a scratch notebook; pass --session-profile AIDP_SESSION only if your tenancy is session-token-only. On a kernel/auth error, refresh (oci session refresh --profile AIDP_SESSION) and retry.

References

  • references/oci-raw-request.md · references/no-mcp-rest-map.md · pairs with aidp-data-quality, aidp-catalog-init

Source and attribution

Source:oracle-samples/oracle-aidp-samplesinai/claude-code-plugins/oracle-ai-data-platform-workbench-engineer-agent/skills/aidp-profiling-tablesat commit90b42d6

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

More from oracle-samples/oracle-aidp-samples

Aidp Workspace Admin

oracle-samples

Provision and inspect AIDP DataLake instances and workspaces, including private-network workspaces attached to a customer VCN/subnet. Use when the user wants to create/list/get a workspace or DataLake instance, set up a new (e.g. private) AIDP environment, or replicate a customer setup. Create/delete are guarded — confirm before any provisioning.

Awaiting classificationOct 8, 2026

Aidp Volumes

oracle-samples

Work with AIDP volumes — list volumes, browse files inside a volume, upload/download via the PAR flow, and create directories. Use when the user mentions volumes, needs to stage large/binary files, or move data in/out of a volume (distinct from the workspace filesystem). Control-plane via the official `aidp` CLI.

Awaiting classificationOct 8, 2026

Aidp Verified Queries

oracle-samples

Maintains a repository of validated question-to-Spark-SQL pairs so an agent reuses trusted SQL before writing new queries.

Data & AnalyticsOct 8, 2026

Aidp User Settings

oracle-samples

Manage AIDP DataLake user settings and preferences via the aidp CLI or oci raw-request fallback.

Productivity & WorkflowOct 8, 2026

Aidp Spark Optimization

oracle-samples

Guides Apache Spark 3.5.0 performance tuning: partitions, shuffle, joins, skew, memory, file layout, AQE and Delta Lake.

Data & AnalyticsOct 8, 2026

Aidp Semantic Model

oracle-samples

Maintains a .aidp/semantic.md business-meaning layer defining metrics, joins, synonyms and value dictionaries for NL-to-SQL grounding.

Data & AnalyticsOct 8, 2026