# How to execute custom expectations using v3 API

**URL:** <https://discourse.greatexpectations.io/t/how-to-execute-custom-expectations-using-v3-api/751>\
**Category:** Archive\
**Tags:** help-wanted\
**Created:** [May 12, 2021, 7:34am UTC](https://discourse.greatexpectations.io/t/how-to-execute-custom-expectations-using-v3-api/751 "2021-05-12T07:34:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leononame](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/leononame/32/105_2.png) [@leononame](https://discourse.greatexpectations.io/u/leononame)\
**Post date:** [May 12, 2021, 7:34am UTC](https://discourse.greatexpectations.io/t/how-to-execute-custom-expectations-using-v3-api/751/1 "2021-05-12T07:34:23Z")

</div>

Hi all,

I’ve been following this guide: [How to create custom Expectations — great\_expectations documentation](https://docs.greatexpectations.io/en/latest/guides/how_to_guides/creating_and_editing_expectations/how_to_create_custom_expectations.html) on how to write a custom expectation using and I’ve been able to create a metric and expectation, I don’t know how to invoke it. With the v2 API, this was pretty easy: just run batch.expect… in your notebook.

But with the batch request API, I don’t know how to actually run the custom expectation. Executing the constructor for it just results in some errors.

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![eugene.mandel](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/eugene.mandel/32/22_2.png) [@eugene.mandel](https://discourse.greatexpectations.io/u/eugene.mandel)\
**Post date:** [May 17, 2021, 3:54pm UTC](https://discourse.greatexpectations.io/t/how-to-execute-custom-expectations-using-v3-api/751/2 "2021-05-17T15:54:11Z")

</div>

Make sure that you import the class of your new custom expectation. Then follow the V3 guides for using any expectations. Your expectation will be available.
