# Schema errors with Stream resource using Foundry code snippet

**URL:** <https://community.palantir.com/t/schema-errors-with-stream-resource-using-foundry-code-snippet/3401>\
**Category:** Ask the Community\
**Tags:** streaming\
**Created:** [April 4, 2025, 2:19pm UTC](https://community.palantir.com/t/schema-errors-with-stream-resource-using-foundry-code-snippet/3401 "2025-04-04T14:19:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmatthews](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@gmatthews](https://community.palantir.com/u/gmatthews)\
**Post date:** [April 4, 2025, 2:19pm UTC](https://community.palantir.com/t/schema-errors-with-stream-resource-using-foundry-code-snippet/3401/1 "2025-04-04T14:19:44Z")

</div>

I have created a new stream resource, defining the custom schema using some example JSON. Once created I have tried posting the same example JSON from Postman and get a 400 Bad Request with error name “Api:RecordDoesNotMatchStreamSchema”.

I get this same error when using the Python code snippet automatically generated by foundry once the resource is created.

Has anyone else experienced this issue? There is no information to debug in what way the schema does not match what the endpoint expects.

---

<div class="post-metadata">

**Author:** ![gmatthews](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@gmatthews](https://community.palantir.com/u/gmatthews)\
**Post date:** [April 4, 2025, 2:53pm UTC](https://community.palantir.com/t/schema-errors-with-stream-resource-using-foundry-code-snippet/3401/2 "2025-04-04T14:53:55Z")

</div>

Update: The error was caused by keys in the JSON containing some prohibited characters (:, -, $, @). Frustratingly when creating the stream there is a validation to check against hyphens “-” but not the other characters so you are able to create the stream even though the schema will not work.

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/palantir/user_avatar/community.palantir.com/system/32/3_2.png) [@system](https://community.palantir.com/u/system)\
**Post date:** [June 3, 2025, 2:54pm UTC](https://community.palantir.com/t/schema-errors-with-stream-resource-using-foundry-code-snippet/3401/3 "2025-06-03T14:54:48Z")

</div>

Closed on June 3, 2025, 2:54pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
