# marshmallow.exceptions.ValidationError: {'name': \['Unknown field.'\]}

**URL:** <https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693>\
**Category:** GX Core Support\
**Tags:** how-to, help-wanted, sql\
**Created:** [April 9, 2024, 8:37am UTC](https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693 "2024-04-09T08:37:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoe](https://avatars.discourse-cdn.com/v4/letter/z/a4c791/32.png) [@zoe](https://discourse.greatexpectations.io/u/zoe)\
**Post date:** [April 9, 2024, 8:37am UTC](https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693/1 "2024-04-09T08:37:43Z")

</div>

hi everyone, I just follow the [GitHub tutorial sql example](https://github.com/great-expectations/great_expectations/tree/develop/examples/demos/primary_keys_in_validation_results/sql) to validate query data in Postgres. But get this error when commit ‘results = checkpoint.run(result\_format=result\_format)’. Can anyone help? many thanks~!!

---

<div class="post-metadata">

**Author:** ![ToivoMattila](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/toivomattila/32/254_2.png) [@ToivoMattila](https://discourse.greatexpectations.io/u/ToivoMattila)\
**Post date:** [April 9, 2024, 3:41pm UTC](https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693/2 "2024-04-09T15:41:38Z")

</div>

Couple of questions to help understand this:

What version of GX are you using?  
What version of Marshmallow do you have installed?  
What operating system are you using?  
Did you download the whole `great_expectations/examples/demos/primary_keys_in_validation_results/sql/` folder when running this?

---

<div class="post-metadata">

**Author:** ![zoe](https://avatars.discourse-cdn.com/v4/letter/z/a4c791/32.png) [@zoe](https://discourse.greatexpectations.io/u/zoe)\
**Post date:** [April 10, 2024, 2:10am UTC](https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693/3 "2024-04-10T02:10:30Z")

</div>

What version of GX are you using?

- 0.18.9

What version of Marshmallow do you have installed?

- 3.7.1

What operating system are you using?

- VScode

Did you download the whole `great_expectations/examples/demos/primary_keys_in_validation_results/sql/` folder when running this?

- I only changed the DB connection & table schema

Hope to hear from you soon~ thank you!!

---

<div class="post-metadata">

**Author:** ![zoe](https://avatars.discourse-cdn.com/v4/letter/z/a4c791/32.png) [@zoe](https://discourse.greatexpectations.io/u/zoe)\
**Post date:** [April 10, 2024, 6:09am UTC](https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693/4 "2024-04-10T06:09:39Z")

</div>

hiiii, I followed this code script and also struggled with the same error…

python code:

from great\_expectations.core.batch import Batch  
from great\_expectations.data\_context.types.resource\_identifiers import ExpectationSuiteIdentifier  
from great\_expectations.expectations.expectation import Expectation  
from great\_expectations.expectations.expectation\_suite import ExpectationSuite

~ Assuming you have a Data Context and a Batch object  
context = …  
batch = …

~ Create a Validator with the Batch and a name for the Expectation Suite  
~ raise error when running this line  
validator = context.get\_validator(batch=batch, expectation\_suite\_name=“my\_expectation\_suite”)

~ Create an expectation that checks if the ‘age’ column contains only non-negative integers  
validator.expect\_column\_values\_to\_be\_between(column=“age”, min\_value=0, max\_value=None, inclusive=True)

~ Save the Expectation Suite to the Data Context  
expectation\_suite = validator.get\_expectation\_suite()  
context.save\_expectation\_suite(expectation\_suite=expectation\_suite,  
identifier=ExpectationSuiteIdentifier(name=“my\_expectation\_suite”,  
version=“1.0.0”,  
runtime\_environment=“my\_env”))

Any ideas? many many thanks!!

---

<div class="post-metadata">

**Author:** ![ToivoMattila](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/toivomattila/32/254_2.png) [@ToivoMattila](https://discourse.greatexpectations.io/u/ToivoMattila)\
**Post date:** [April 12, 2024, 9:58am UTC](https://discourse.greatexpectations.io/t/marshmallow-exceptions-validationerror-name-unknown-field/1693/5 "2024-04-12T09:58:58Z")

</div>

Hi!

Thank you!  
Unfortunately I haven’t gotten this error myself and even with the additional information can’t figure out what is going on.

Hopefully someone else knows something about this. Maybe @HaebichanGX?

I came across this in the Marshmallow documentation, does that help in any way?  
[https://marshmallow.readthedocs.io/en/stable/quickstart.html#handling-unknown-fields](https://marshmallow.readthedocs.io/en/stable/quickstart.html#handling-unknown-fields)
