# How to create a new Expectation Suite using suite scaffold

**URL:** <https://discourse.greatexpectations.io/t/how-to-create-a-new-expectation-suite-using-suite-scaffold/199>\
**Category:** Archive\
**Tags:** how-to, help-wanted\
**Created:** [May 28, 2020, 1:45pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-new-expectation-suite-using-suite-scaffold/199 "2020-05-28T13:45:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/kyle/32/18_2.png) [@kyle](https://discourse.greatexpectations.io/u/kyle)\
**Post date:** [May 28, 2020, 1:45pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-new-expectation-suite-using-suite-scaffold/199/1 "2020-05-28T13:45:01Z")

</div>

This article is for comments to: [https://docs.greatexpectations.io/en/latest/how\_to\_guides/creating\_and\_editing\_expectations/how\_to\_create\_a\_new\_expectation\_suite\_using\_suite\_scaffold.html](https://docs.greatexpectations.io/en/latest/how_to_guides/creating_and_editing_expectations/how_to_create_a_new_expectation_suite_using_suite_scaffold.html)

Please comment +1 if this How to is important to you.

---

<div class="post-metadata">

**Author:** ![yloo](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@yloo](https://discourse.greatexpectations.io/u/yloo)\
**Post date:** [November 20, 2020, 4:41am UTC](https://discourse.greatexpectations.io/t/how-to-create-a-new-expectation-suite-using-suite-scaffold/199/2 "2020-11-20T04:41:56Z")

</div>

Is there a way to create expectation based on current data profile using scaffold in python instead of the interactive cli? Would very much want to do it as an airflow job

---

<div class="post-metadata">

**Author:** ![sam](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/sam/32/48_2.png) [@sam](https://discourse.greatexpectations.io/u/sam)\
**Post date:** [November 20, 2020, 7:16pm UTC](https://discourse.greatexpectations.io/t/how-to-create-a-new-expectation-suite-using-suite-scaffold/199/3 "2020-11-20T19:16:45Z")

</div>

You should be able to just use the boilerplate code that’s in the notebook when you run `suite scaffold` directly in an Airflow task! `suite scaffold`creates a new suite under the hood, so you’ll have to add that step to the code:

- Grab the code to create a new suite without the CLI here: [https://docs.greatexpectations.io/en/latest/guides/how\_to\_guides/creating\_and\_editing\_expectations/how\_to\_create\_a\_new\_expectation\_suite\_without\_the\_cli.html](https://docs.greatexpectations.io/en/latest/guides/how_to_guides/creating_and_editing_expectations/how_to_create_a_new_expectation_suite_without_the_cli.html)
- Do a “dummy” run with `great_expectations suite scaffold` to open the scaffold notebook and grab the code that runs the profiling and saves the suite.
- Drop the code into an Airflow Python task

Could you report back here if that worked for you?
