Skip to content
Back to skills

Great Expectations

ASecurity

Data validation using Great Expectations. Expectation suites, checkpoints, and data docs for pipeline monitoring.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
devopspythongobashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 12, 2026

npx -y skills add stanfish06/skillquarium --skill great-expectations --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Great Expectations?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Great Expectations
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/stanfish06-great-expectations/badge)](https://www.skillsdirectory.com/skills/stanfish06-great-expectations)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: great-expectations
description: Data validation using Great Expectations. Expectation suites, checkpoints, and data docs for pipeline monitoring.
allowed-tools: Read Write Edit Bash
---

# Great Expectations

**Audience:** Data engineers building validated data pipelines.

**Goal:** Provide GX patterns for expectation-based validation and monitoring.

## Scripts

Execute GX functions from `scripts/expectations.py`:

```python
from scripts.expectations import (
    get_pandas_context,
    add_dataframe_asset,
    create_basic_suite,
    run_validation
)
```

## Usage Examples

### Quick Setup

```python
from scripts.expectations import get_pandas_context, add_dataframe_asset

context, data_source = get_pandas_context("my_datasource")
batch_definition = add_dataframe_asset(data_source, "users")
```

### Create Expectation Suite

```python
from scripts.expectations import create_basic_suite

columns_config = {
    'user_id': {'not_null': True, 'unique': True, 'type': 'int'},
    'age': {'min': 0, 'max': 150},
    'status': {'values': ['active', 'inactive', 'pending']},
    'email': {'regex': r'^[\w\.-]+@[\w\.-]+\.\w+$'}
}

suite = create_basic_suite(context, "user_suite", columns_config)
```

### Run Validation

```python
from scripts.expectations import run_validation

results = run_validation(
    context,
    checkpoint_name="user_checkpoint",
    batch_definition=batch_definition,
    suite=suite,
    df=df
)

if results['success']:
    print("All expectations passed!")
else:
    for failure in results['failures']:
        print(f"Failed: {failure['expectation']} on {failure['column']}")
```

## Common Expectations Reference

| Category | Expectation | Description |
|----------|-------------|-------------|
| Table | `ExpectTableRowCountToBeBetween` | Row count range |
| Existence | `ExpectColumnToExist` | Column must exist |
| Nulls | `ExpectColumnValuesToNotBeNull` | No null values |
| Range | `ExpectColumnValuesToBeBetween` | Value bounds |
| Set | `ExpectColumnValuesToBeInSet` | Allowed values |
| Pattern | `ExpectColumnValuesToMatchRegex` | Regex match |
| Unique | `ExpectColumnValuesToBeUnique` | No duplicates |

## Data Docs

```python
# Build and open HTML reports
context.build_data_docs()
context.open_data_docs()
```

## Directory Structure

```
gx/
├── great_expectations.yml     # Config
├── expectations/              # Expectation suites (JSON)
├── checkpoints/               # Checkpoint definitions
├── validation_definitions/    # Validation definitions
├── plugins/                   # Custom expectations
└── uncommitted/
    ├── data_docs/            # Generated HTML docs
    └── validations/          # Validation results
```

## When to Use Great Expectations

| Use Case | GX | Alternative |
|----------|-----|-------------|
| Pipeline monitoring | ✓ | - |
| Data warehouse validation | ✓ | - |
| Automated data docs | ✓ | - |
| Simple DataFrame checks | - | Pandera |
| Record-level API validation | - | Pydantic |

## Dependencies

```
great_expectations>=1.0,<2.0
pandas
```

Files in this skill

  • SKILL.md3 KB
  • scripts/expectations.py5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.