# For the custom expectation do we need to register the expectation

**URL:** <https://discourse.greatexpectations.io/t/for-the-custom-expectation-do-we-need-to-register-the-expectation/2168>\
**Category:** GX Core Support\
**Created:** [April 1, 2025, 9:44am UTC](https://discourse.greatexpectations.io/t/for-the-custom-expectation-do-we-need-to-register-the-expectation/2168 "2025-04-01T09:44:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navaneeth](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Navaneeth](https://discourse.greatexpectations.io/u/Navaneeth)\
**Post date:** [April 1, 2025, 9:44am UTC](https://discourse.greatexpectations.io/t/for-the-custom-expectation-do-we-need-to-register-the-expectation/2168/1 "2025-04-01T09:44:41Z")

</div>

for the validation framework i’m try to validate the data using the custom expectation by creating the seperate the custom expectation .py file and i’m trying to importing the expectation from there, for the validation, i’m stuck to use the custom expectation.

from great\_expectations.expectations.registry import register\_expectation  
from custom\_expectations.ExpectColumnValuesToBeUppercase import ExpectColumnValuesToBeUppercase

-Register custom expectation

register\_expectation(ExpectColumnValuesToBeUppercase)

import streamlit as st  
import pandas as pd  
import sqlite3  
from sqlalchemy import create\_engine, inspect  
import great\_expectations as gx  
import os  
import pyodbc  
from great\_expectations.core import ExpectationConfiguration  
from great\_expectations.core.batch import RuntimeBatchRequest  
import json  
import streamlit.components.v1 as components  
from great\_expectations.validator.validator import Validator  
from great\_expectations.execution\_engine import PandasExecutionEngine  
from great\_expectations.data\_context.types.base import DatasourceConfig  
from great\_expectations.datasource.data\_connector import RuntimeDataConnector

what is approach to fix this, i followed the docs, can any one help me to fix this custom expectation, if you already know about this,  
share me the steps to create custom expectation to validate in framework steps, this will help me to cross check with my custom expectation steps

---

<div class="post-metadata">

**Author:** ![Navaneeth](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Navaneeth](https://discourse.greatexpectations.io/u/Navaneeth)\
**Post date:** [April 1, 2025, 9:51am UTC](https://discourse.greatexpectations.io/t/for-the-custom-expectation-do-we-need-to-register-the-expectation/2168/2 "2025-04-01T09:51:31Z")

</div>

i am trying to use this custom expectation, before that i am registering the expectation, using this code  
[  
from custom\_expectations.ExpectColumnValuesToBeUppercase import ExpectColumnValuesToBeUppercase

from great\_expectations.expectations.registry import register\_expectation  
register\_expectation(ExpectColumnValuesToBeUppercase)  
from great\_expectations.expectations.registry import list\_registered\_expectation\_implementations

print(“Registered expectations:”, list\_registered\_expectation\_implementations())  
]  
i have taken this custom expectation for an example, once i run the above code, i can’t able to see my custom expectation on the registry,

this process is correct or not to use the custom expectation, let me know if any one know about this?

---

<div class="post-metadata">

**Author:** ![mahfooz.iiitian](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/mahfooz.iiitian/32/371_2.png) [@mahfooz.iiitian](https://discourse.greatexpectations.io/u/mahfooz.iiitian)\
**Post date:** [April 8, 2025, 7:08am UTC](https://discourse.greatexpectations.io/t/for-the-custom-expectation-do-we-need-to-register-the-expectation/2168/3 "2025-04-08T07:08:45Z")

</div>

Which version of great-expectation are you using it?

---

<div class="post-metadata">

**Author:** ![Navaneeth](https://avatars.discourse-cdn.com/v4/letter/n/b487fb/32.png) [@Navaneeth](https://discourse.greatexpectations.io/u/Navaneeth)\
**Post date:** [June 9, 2025, 11:13am UTC](https://discourse.greatexpectations.io/t/for-the-custom-expectation-do-we-need-to-register-the-expectation/2168/4 "2025-06-09T11:13:49Z")

</div>

I’m using the Version 0.18
