# Pre-processing SQL query before executing expectations

**URL:** https://discourse.greatexpectations.io/t/pre-processing-sql-query-before-executing-expectations/598
**Category:** Archive
**Tags:** help-wanted
**Created:** [January 19, 2021, 8:21pm UTC](https://discourse.greatexpectations.io/t/pre-processing-sql-query-before-executing-expectations/598 "2021-01-19T20:21:02Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@ryan](https://discourse.greatexpectations.io/u/ryan)
#### Post date: [January 19, 2021, 8:21pm UTC](https://discourse.greatexpectations.io/t/pre-processing-sql-query-before-executing-expectations/598/1 "2021-01-19T20:21:02Z")

</div>

Hi folks,

I’m working on migrating from v0.12 to 0.13 and I noticed that when I fetched a batch in 0.12 I could include a `query` in the `batch_kwargs` to, say, cast strings to numeric as a preprocessing step. This was super helpful as we have some postgres tables that need a bit of TLC before they’re ready for validation. Is there an analogue with `BatchRequest` in v0.13? Did this functionality migrate elsewhere during the refactor?

---

<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: [February 19, 2021, 9:57pm UTC](https://discourse.greatexpectations.io/t/pre-processing-sql-query-before-executing-expectations/598/2 "2021-02-19T21:57:31Z")

</div>

This capability was not included in the initial version of the new API in 0.13. We have revisited this since and will release an update that will allow to create a Validator from a SQL query, using RuntimeDataConnector. Please watch for release anncouncements.
